This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 114a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-04-18


1754. Declaration of partial specialization of static data member template

Section: 13.7.6  [temp.spec.partial]     Status: NAD     Submitter: Richard Smith     Date: 2013-09-19

There does not appear to be a way to declare (not define) a partial specialization of a static data member template outside its class. The rule for explicit specializations (13.9.4 [temp.expl.spec] paragraph 13) is that the presence or absence of an initializer determines whether the explicit specialization is a definition or not. Applying this rule to the partial specialization case, however, would conflict with being able to provide an initializer on the declaration within the class.

Do we need to support declaring partial specializations of static data member templates outside their class?

Rationale (February, 2014):

CWG felt that this issue is more appropriately considered by EWG.

Additional note, April, 2015:

EWG has decided not to make a change in this area. See EWG issue 132.