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

2024-11-11


2041. Namespace for explicit class template specialization

Section: 13.9.4  [temp.expl.spec]     Status: CD4     Submitter: Jason Merrill     Date: 2014-11-11

[Adopted at the February, 2016 meeting.]

13.9.4 [temp.expl.spec] paragraph 2 says,

An explicit specialization shall be declared in a namespace enclosing the specialized template. An explicit specialization whose declarator-id is not qualified shall be declared in the nearest enclosing namespace of the template, or, if the namespace is inline (9.8.2 [namespace.def]), any namespace from its enclosing namespace set.

However, an explicit specialization of a class template does not have a declarator-id.

Proposed resolution (September, 2015):

Change 13.9.4 [temp.expl.spec] paragraph 2 as follows:

An explicit specialization shall be declared in a namespace enclosing the specialized template. An explicit specialization whose declarator-id or class-head-name is not qualified shall be declared in the nearest enclosing namespace of the template, or, if the namespace is inline (9.8.2 [namespace.def]), any namespace from its enclosing namespace set. Such a declaration...