This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/44548] Link error when defining templated static const variable
- From: "redi at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Jun 2010 12:11:59 -0000
- Subject: [Bug c++/44548] Link error when defining templated static const variable
- References: <bug-44548-19329@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from redi at gcc dot gnu dot org 2010-06-16 12:11 -------
(In reply to comment #4)
> So what the above code actually means? Is it valid?
Yes, it's valid. It declares an explicit specialization, which inhibits the
implicit instantiation of the default specialization.
In order for the code to be valid a definition must be provided. It isn't, so
you get a link error.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44548