c++/588: defining static data member of template class needs initializer
Jason Merrill
jason@redhat.com
Sun Feb 18 03:45:00 GMT 2001
`Jason Merrill' changed the state to `closed'.
State-Changed-From-To: open-closed
State-Changed-By: jason
State-Changed-When: Sun Feb 18 11:38:08 2001
State-Changed-Why:
This is not a bug.
14.7.3 Explicit specialization [temp.expl.spec]
15An explicit specialization of a static data member of a template is a
definition if the declaration includes an initializer; otherwise, it
is a declaration. [Note: there is no syntax for the definition of a
static data member of a template that requires default initialization.
template<> X Q<int>::x;
This is a declaration regardless of whether X can be default initial-
ized (_dcl.init_). ]
More information about the Gcc-bugs
mailing list