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: egcs 1.0.3 template and typedef bug


Pavlos Papageorgiou <pavlos.papageorgiou@voxar.com> writes:

> It seems that egcs-1.0.3 does not support typedefs within classes
> that are used as template parameters.

Actually, it requires you to comply with the C++ Standard, and precede 
such template-dependent type names with the keyword `typename':

>         Traits::Integer i = 3;

 typename Traits::Integer i = 3; // this compiles fine

In some cases, it will recognize that you mean a type name, but not in 
this particular case.

-- 
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil



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