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]

Re: template bug?


>>>>> Dave Taylor <ddt@crack.com> writes:

> The following file:
> 	template <class T>
> 	fart(T &a)
> 	{
> 		T::inside_class damn;
> 	}

> compiled with "g++ -c t.cc" barfs with

> 	u.cc: In function `int fart(T &)':
> 	u.cc:4: parse error before `;'

You need to say "typename T::inside_class".

Jason


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