This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/588: defining static data member of template class needs initializer
- To: Not yet assigned to anyone <nobody at gcc dot gnu dot org>, brianchon at sina dot com
- Subject: Re: c++/588: defining static data member of template class needs initializer
- From: Jason Merrill <jason at redhat dot com>
- Date: Sun, 18 Feb 2001 11:39:29 GMT
- CC: gcc-bugs at gcc dot gnu dot org
`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_). ]