template friend bug when using namespaces.
Jason Nye
jnye@nbnet.nb.ca
Sat Feb 26 07:51:00 GMT 2000
Code that causes internal compiler error:
---- dumbtest.cpp ------
namespace ANamespace {
template <class T>
class AClass {
template <class U>
friend class AClass;
};
}
int main()
{
return 0;
}
---- end dumbtest.cpp --
Notice that there are no includes.
Command line: g++ -c dumbtest.cpp
If you remove the namespace, the code will compile fine.
My system:
RedHat 6.0 with kernel 2.2.9, gcc 2.95.1
Hope this helps,
Jason
More information about the Gcc-bugs
mailing list