Title
Acceptable scopes for definition of partial specialization
Status
cd4
Section
13.7.6.1 [temp.spec.partial.general]
Submitter
Richard Smith

Created on 2013-12-05.00:00:00 last changed 95 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 (13.7.6 [temp.spec.partial]), 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 13.7.6 [temp.spec.partial] paragraph 6 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 13.7.6 [temp.spec.partial] paragraph 6 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: 2022-06-11.20:21:09

According to 13.7.6 [temp.spec.partial] paragraph 6,

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