This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: 19980824 bugs in initializing static const members
- To: "Reid M. Pinchback" <reidmp at MIT dot EDU>
- Subject: Re: 19980824 bugs in initializing static const members
- From: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Date: 01 Sep 1998 23:25:15 -0300
- Cc: egcs-bugs at cygnus dot com
- References: <2.2.32.19980828171813.00e57fec@po9.mit.edu>
Reid M Pinchback <reidmp@MIT.EDU> writes:
> Based on your information we now see that the cases A and A+X
> are probably (definitely? see below) correct compiler behaviour;
> they yield the compile-time error that the initializer isn't
> constant. Shouldn't the cases A+Y and A+X+Y *also* yield the
> exact same compile-time error?
Yup. Perhaps egcs will only produce the error message when the static
data member is referenced (as it does for template member functions),
or only when it finds a definition of the static member outside the
template class body.
> Shouldn't the process of abstracting a class into template be an
> invertable function with respect to instantiation?
If it is done completely (i.e., if the static members are defined as
required in the Standard), yes.
--
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil