This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

ICE when compiling nested friend template in namespace


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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]