Title
Acceptable scopes for definition of partial specialization
Status
cd4
Section
_N4868_.13.7.6 [temp.class.spec]
Submitter
Richard Smith

Created on 2013-12-05.00:00:00 last changed 49 months ago

Messages

Date: 2014-11-15.00:00:00

[Moved to DR at the November, 2014 meeting.]

Date: 2014-07-15.00:00:00

Proposed Resolution (July, 2014):

  1. Change 9.8.2 [namespace.def] paragraph 8 as follows:

  2. ...Furthermore, each member of the inline namespace can subsequently be partially specialized (_N4868_.13.7.6 [temp.class.spec]), explicitly instantiated (13.9.3 [temp.explicit]), or explicitly specialized (13.9.4 [temp.expl.spec]) as though it were a member of the enclosing namespace. Finally, looking up a name...
  3. Change _N4868_.13.7.6 [temp.class.spec] paragraph 5 as follows:

  4. A class template partial specialization may be declared or redeclared in any namespace scope in which its definition the corresponding primary template may be defined (13.7.2 [temp.class] _N4868_.9.8.2.3 [namespace.memdef] and 13.7.3 [temp.mem]). [Example:...
Date: 2014-03-03.00:00:00

Additional note, February, 2014:

The proposed resolution approved by CWG at the February, 2014 meeting does not address the additional points raised in the issue, specifically the cross-reference to 13.7.2 [temp.class] and the omission of partial specializations from 9.8.2 [namespace.def]. The issue has been returned to "review" status to consider amending the resolution to include these items.

Date: 2014-02-15.00:00:00

Proposed resolution (February, 2014) [SUPERSEDED]:

Change _N4868_.13.7.6 [temp.class.spec] paragraph 5 as follows:

A class template partial specialization may be declared or redeclared in any namespace scope in which its definition the corresponding primary template may be defined (13.7.2 [temp.class] and 13.7.3 [temp.mem]). [Example:...
Date: 2021-02-24.00:00:00

According to _N4868_.13.7.6 [temp.class.spec] paragraph 5,

A class template partial specialization may be declared or redeclared in any namespace scope in which its definition may be defined (13.7.2 [temp.class] and 13.7.3 [temp.mem]).

However, there is nothing in those referenced sections specifying where the definition may appear. Should this have referred to the definition of the primary template?

Also, the cross-reference to 13.7.2 [temp.class] is suspect; the actual rules for where non-member class templates may be defined are found in _N4868_.9.8.2.3 [namespace.memdef] paragraphs 1-2, 9.3.4 [dcl.meaning] paragraph 1, and 9.8.2 [namespace.def] paragraph 8.

(Apropos of 9.8.2 [namespace.def], the description in paragraph 8 mentions explicit instantiation and explicit specialization, but presumably inadvertently omits partial specializations.)

History
Date User Action Args
2017-02-06 00:00:00adminsetstatus: drwp -> cd4
2015-05-25 00:00:00adminsetstatus: dr -> drwp
2015-04-13 00:00:00adminsetmessages: + msg5409
2014-11-24 00:00:00adminsetstatus: tentatively ready -> dr
2014-10-13 00:00:00adminsetmessages: + msg5144
2014-10-13 00:00:00adminsetstatus: drafting -> tentatively ready
2014-07-07 00:00:00adminsetstatus: review -> drafting
2014-03-03 00:00:00adminsetmessages: + msg4871
2014-03-03 00:00:00adminsetmessages: + msg4870
2014-03-03 00:00:00adminsetstatus: open -> review
2013-12-05 00:00:00admincreate