template bug ?

Milos Grundman grundman@mip.ups-tlse.fr
Wed Dec 2 08:11:00 GMT 1998


// gcc version pgcc-2.91.57 19980901 (egcs-1.1 release)

template <int i> class a
{
public :

template <int j> int f() const { return f<j-1>(); };
template <> int f<0>() const {  return 0; };
};

int main()
{
a<2> x;
return x.f<1>(); // maybe it is incorrect
}




More information about the Gcc-bugs mailing list