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: 19980824 bugs in initializing static const members


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



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