typedef, class template and inheritance

Jason Merrill jason@cygnus.com
Sat Oct 4 10:29:00 GMT 1997

>>>>> Gabriel Dos Reis <Gabriel.Dos-Reis@dptmaths.ens-cachan.fr> writes:

> 	From my reading of Bjarne's 3rd edition "The C++ Progamming
> Language", I understand that the keyword typename is required when the
> type is a _parameter_ (the compiler is not psychic to figure out
> whether fred_t is a type name or not).

Nope, it's required whenever the type *depends on* a template parameter, as
foo<T, T> does.  That g++ accepts the code at all is an extension; you have
found a bug in that extension.


More information about the Gcc-bugs mailing list