Title
Definition of enumeration declared by using-declaration
Status
cd4
Section
9.7.1 [dcl.enum]
Submitter
Richard Smith

Created on 2015-07-06.00:00:00 last changed 87 months ago

Messages

Date: 2016-02-15.00:00:00

Proposed resolution (February, 2016):

Add the following as a new paragraph at the end of 9.7.1 [dcl.enum]:

If an enum-head contains a nested-name-specifier, the enum-specifier shall refer to an enumeration that was previously declared directly in the class or namespace to which the nested-name-specifier refers, or in an element of the inline namespace set (9.8.2 [namespace.def]) of that namespace (i.e., not merely inherited or introduced by a using-declaration), and the enum-specifier shall appear in a namespace enclosing the previous declaration. In such cases, the nested-name-specifier of the enum-head of the definition shall not begin with a decltype-specifier.
Date: 2016-02-15.00:00:00

[Adopted at the February, 2016 meeting.]

The description of enumeration declarations in 9.7.1 [dcl.enum] does not, but should, contain similar wording to that preventing a class definition from defining a class type named by a using-declaration:

If a class-head-name contains a nested-name-specifier, the class-specifier shall refer to a class that was previously declared directly in the class or namespace to which the nested-name-specifier refers, or in an element of the inline namespace set (9.8.2 [namespace.def]) of that namespace (i.e., not merely inherited or introduced by a using-declaration), and the class-specifier shall appear in a namespace enclosing the previous declaration. In such cases, the nested-name-specifier of the class-head-name of the definition shall not begin with a decltype-specifier.
History
Date User Action Args
2017-02-06 00:00:00adminsetstatus: tentatively ready -> cd4
2016-02-15 00:00:00adminsetmessages: + msg5703
2016-02-15 00:00:00adminsetstatus: drafting -> tentatively ready
2015-07-06 00:00:00admincreate