template bug?

Jason Merrill jason@cygnus.com
Fri Mar 27 12:13:00 GMT 1998


>>>>> 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



More information about the Gcc-bugs mailing list