This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: typedef, class template and inheritance
- To: Gabriel dot Dos-Reis at dptmaths dot ens-cachan dot fr (Gabriel Dos Reis), egcs-bugs at cygnus dot com
- Subject: Re: typedef, class template and inheritance
- From: Jason Merrill <jason at cygnus dot com>
- Date: 04 Oct 1997 10:28:52 -0700
- References: <oren62sosy.fsf@sunsite.dcc.unicamp.br><199710041109.NAA09129.cygnus.egcs.bugs@basson.dptmaths.ens-cachan.fr>
>>>>> 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