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: typedef, class template and inheritance


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

Jason


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