This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/19610] default constructor not called for static template member of template class
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Jan 2005 04:16:53 -0000
- Subject: [Bug c++/19610] default constructor not called for static template member of template class
- References: <20050124202231.19610.jamesp@trdlnk.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2005-01-26 04:16 -------
The declaration of a specialization is not a definition, unless it has
an explicit initializer call. The way you want to write this is
as follows:
template <> A<char> B<char>::a = A<char>();
The standard specifically says that this is the only permissible
syntax for default initialization.
W.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19610