This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: "redefinition" of template default argument causes error on egcs 1.1b (no error on 2.8.1)
- To: Corey Kosak <kosak at cs dot cmu dot edu>
- Subject: Re: "redefinition" of template default argument causes error on egcs 1.1b (no error on 2.8.1)
- From: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Date: 09 Sep 1998 01:30:02 z
- Cc: egcs-bugs at cygnus dot com
- References: <199809081938.MAA07195@cygnus.com>
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