This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: egcs 1.0.3 template and typedef bug
- To: Pavlos Papageorgiou <pavlos dot papageorgiou at voxar dot com>
- Subject: Re: egcs 1.0.3 template and typedef bug
- From: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Date: 02 Oct 1998 00:51:45 -300
- Cc: egcs-bugs at cygnus dot com
- References: <36139EA1.755D6F04@voxar.com>
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