ICE when compiling nested friend template in namespace
Todd Vierling
tv@pobox.com
Mon Jul 24 04:50:00 GMT 2000
The following fragment causes an ICE on gcc 2.95.2 (sparc-solaris), but does
not on egcs 1.1.2.
==========
namespace NS
{
template <typename T>
class C
{
template <typename T2>
friend class C;
};
};
==========
However, the following variant does not (removing the namespace block).
==========
template <typename T>
class C
{
template <typename T2>
friend class C;
};
==========
(The purpose of this construct is to make all types of the template class C
be friends of each other.)
--
-- Todd Vierling (tv@pobox.com)
More information about the Gcc-bugs
mailing list