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: Jason Merrill <jason at cygnus dot com>
- Subject: Re: typedef, class template and inheritance
- From: Gabriel Dos Reis <Gabriel dot Dos-Reis at dptmaths dot ens-cachan dot fr>
- Date: Sat, 4 Oct 1997 23:18:27 +0200 (MET DST)
- Cc: egcs-bugs at cygnus dot com
- References: <oren62sosy.fsf@sunsite.dcc.unicamp.br><199710041109.NAA09129.cygnus.egcs.bugs@basson.dptmaths.ens-cachan.fr><u9k9ftzbcb.fsf@yorick.cygnus.com>
>>>>> «Jason», Jason Merrill <jason@cygnus.com> wrote:
>>>>> 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).
Jason> Nope, it's required whenever the type *depends on* a template parameter, as
Jason> foo<T, T> does. That g++ accepts the code at all is an extension; you have
Jason> found a bug in that extension.
So here goes a question: is code listed in Bjarne's book (page 557)
illegal? He said his code is pure C++ and get compiled.
-- Gaby