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]
Other format: [Raw text]

[Bug c++/10530] [3.4 regression] Cannot access non-dependent type within nested template


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10530



------- Additional Comments From GccBugs at Skyler dot com  2003-07-21 01:16 -------
Is this related:

struct	Base2	{	};

template<class T>
struct	Base1
{
	template<class U>
	struct	TypeDef	{	typedef	Base2	SecondBase;	};
};

template<class T>
struct	Derived	:	public	Base1<int>,
									public
	Base1<T>::TypeDef<float>::SecondBase
{	};

int	main	(void)
{	Derived<long>	derived;	}

g++ 3.2 under Cygwin in Win2K produces:

t.cpp: In instantiation of `Derived<long int>':
t.cpp:16:   instantiated from here
t.cpp:16: base class `Base1<T>::TypeDef<float>::SecondBase' has incomplete type

Make either template a non-template class and the error message goes away.


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