This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: typename problem ?
- To: miniussi at ilog dot fr (Miniussi)
- Subject: Re: typename problem ?
- From: Joe Buck <jbuck at Synopsys dot COM>
- Date: Tue, 15 Dec 98 9:24:26 PST
- Cc: egcs at cygnus dot com
> In :
>
> template <class X>
> struct Truc {
> typedef int tp;
> tp get();
> };
>
> template<class X>
> Truc<X>::tp // line 9
> Truc<X>::get() {return 42;}
>
> It seems that a typename is required line 9 (14.6(6)), but egcs does
> not require it, even with -pedantic (and it seems that the provided
> STL uses such a construct without typename). Did I missed something
> with 14.6(6)?
It's a bug: egcs currently does not require typename in all the places
that it should. As you say, there should at least be a warning.