This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
template friend bug when using namespaces.
- To: gcc-bugs at gcc dot gnu dot org
- Subject: template friend bug when using namespaces.
- From: Jason Nye <jnye at nbnet dot nb dot ca>
- Date: Sat, 26 Feb 2000 12:09:42 -0400
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