static template initialization pb
Alexandre Oliva
oliva@dcc.unicamp.br
Sun Nov 30 14:29:00 GMT 1997
writes:
> I believe the current standard should allow initialization in the
> declaration, so this should work:
But this only works for integral types, and definition outside the
class body is still mandatory unless you define a constant. In this
case, the definition must not contain an initialization:
template<class T> T X<T>::c; // = 0;
--
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
mailing list