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?


On Wed, 25 Mar 1998, Dave Taylor wrote:
> 	template <class T>
> 	fart(T &a)
> 	{
> 		T::inside_class damn;
> 	}

This is not valid ISO C++ code, line 4 should actually read
  typename T::inside_class damn;

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

I agree, however, that the error message you got in this case is 
somewhat confusing.

Moreover, shouldn't this be handled by the "implicit typename" gcc
extension? (Mark? Jason?)

Gerald
-- 
Gerald Pfeifer (Jerry)      Vienna University of Technology
pfeifer@dbai.tuwien.ac.at   http://www.dbai.tuwien.ac.at/~pfeifer/



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