Title
member-declaration requirements and unnamed bit-fields
Status
c++14
Section
11.4 [class.mem]
Submitter
Richard Smith

Created on 2013-04-15.00:00:00 last changed 122 months ago

Messages

Date: 2014-02-15.00:00:00

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

Date: 2013-11-15.00:00:00

Proposed resolution (November, 2013):

  1. Change 9.1 [dcl.pre] paragraph 3 as follows:

  2. ...In such cases, and except for the declaration of an unnamed bit-field (11.4.10 [class.bit]), the decl-specifier-seq shall introduce one or more names into the program, or shall redeclare a name introduced by a previous declaration. [Example:...
  3. Change 11.4 [class.mem] paragraph 1 as follows:

  4. ...Except when used to declare friends (11.8.4 [class.friend]), to declare an unamed bit-field (11.4.10 [class.bit]), or to introduce the name of a member of a base class into a derived class (9.9 [namespace.udecl]), member-declarations declare members of the class, and each such member-declaration shall declare at least one member name of the class. A member shall not...
Date: 2013-10-15.00:00:00

Additional note (October, 2013):

Curiously, the exemption for an unnamed bit-field not introducing names is in 9.1 [dcl.pre] paragraph 3, referring to a simple-declaration. However, a simple-declaration is not a member-declaration and thus does not apply.

Date: 2014-01-20.00:00:00

According to 11.4 [class.mem] paragraph 1,

Except when used to declare friends (11.8.4 [class.friend]) or to introduce the name of a member of a base class into a derived class (9.9 [namespace.udecl]), member-declarations declare members of the class, and each such member-declaration shall declare at least one member name of the class.

Unnamed bit-fields (11.4.10 [class.bit] paragraph 2) are described as not being members, and they obviously do not declare a member name; presumably they should therefore be included among the exceptions to this rule.

History
Date User Action Args
2014-11-24 00:00:00adminsetstatus: dr -> c++14
2014-03-03 00:00:00adminsetmessages: + msg4953
2014-03-03 00:00:00adminsetstatus: tentatively ready -> dr
2014-01-20 00:00:00adminsetmessages: + msg4732
2014-01-20 00:00:00adminsetmessages: + msg4731
2014-01-20 00:00:00adminsetstatus: open -> tentatively ready
2013-04-15 00:00:00admincreate