"redefinition" of template default argument causes error on egcs 1.1b (no error on 2.8.1)
Alexandre Oliva
oliva@dcc.unicamp.br
Tue Sep 8 23:43:00 GMT 1998
Corey Kosak <kosak@cs.cmu.edu> writes:
> template<typename T=int> struct cow; //forward declaration
> #ifdef BUG
> template<typename T=int> struct cow { T data; };
> #endif
Good to know you mark and #ifdef out BUGs so clearly in your code :-)
The C++ Standard does not allow duplicate declaration of default
arguments. [temp.param]/12 explicitly forbids this.
--
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil
More information about the Gcc-bugs
mailing list