This is the mail archive of the gcc@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: typename problem ?


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



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