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: "redefinition" of template default argument causes error on egcs 1.1b (no error on 2.8.1)


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



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