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

2024-12-19


1638. Declaring an explicit specialization of a scoped enumeration

Section: 9.7.1  [dcl.enum]     Status: CD4     Submitter: Richard Smith     Date: 2013-03-12

[Adopted at the February, 2016 meeting.]

There is no syntax currently for declaring an explicit specialization of a member scoped enumeration. A declaration (not a definition) of such an explicit specialization most resembles an opaque-enum-declaration, but the grammar for that requires that the name be a simple identifier, which will not be the case for an explicit specialization of a member enumeration. This could be remedied by adding a nested-name-specifier to the grammar with a restriction that a nested-name-specifier only appear in an explicit specialization.

Proposed resolution (October, 2015):

  1. Change the grammar in 9.7.1 [dcl.enum] paragraph 1 as follows:

  2. Add the following at the end of 9.7.1 [dcl.enum] paragraph 1:

  3. If an opaque-enum-declaration contains a nested-name-specifier, the declaration shall be an explicit specialization (13.9.4 [temp.expl.spec]).