This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/44552] specialization of static const class member declaration should issue warning.
- 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: 15 Jun 2010 23:21:06 -0000
- Subject: [Bug c++/44552] specialization of static const class member declaration should issue warning.
- References: <bug-44552-19329@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from redi at gcc dot gnu dot org 2010-06-15 23:21 -------
N.B. it's not necessarily a mistake. If an explicit specialization is defined
in another translation unit then the implicit instantiation of the primary
template must be suppressed, or you get multiple definitions and an ODR
violation.
See pages 197-198 of Vandevoorde & Josuttis for a very similar example and
explanation.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44552