This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
ICE when compiling nested friend template in namespace
- To: bug-gcc at gnu dot org
- Subject: ICE when compiling nested friend template in namespace
- From: Todd Vierling <tv at pobox dot com>
- Date: Mon, 24 Jul 2000 07:42:06 -0400 (EDT)
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)