template bug?

Dave Taylor ddt@crack.com
Fri Mar 27 13:49:00 GMT 1998


Thanks.  I clearly need a C++ refresher.  :)

	=-ddt->

On Thu, 26 Mar 1998, Gerald Pfeifer wrote:

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

---------
Dave Taylor, Owner
Crack dot Com, Inc.  http://crack.com




More information about the Gcc-bugs mailing list