Title
What is a “direct member?”
Status
c++17
Section
11.5 [class.union]
Submitter
Dawn Perchik

Created on 2014-02-13.00:00:00 last changed 36 months ago

Messages

Date: 2016-11-15.00:00:00

Proposed resolution (November, 2016):

  1. Change 9.4.2 [dcl.init.aggr] paragraph 2 as follows:

  2. The elements of an aggregate are:

    • for an array, the array elements in increasing subscript order, or

    • for a class, the direct base classes in declaration order followed by the direct non-static data members that are not members of an anonymous union, in declaration order.

  3. Change 11.4 [class.mem] paragraph 1 as follows:

  4. The member-specification in a class definition declares the full set of members of the class; no member can be added elsewhere. A direct member of a class X is a member of X that was first declared within the member-specification of X, including anonymous union objects and direct members thereof. Members of a class are...
  5. Change 11.5.2 [class.union.anon] paragraph 1 as follows:

  6. A union of the form

      union { member-specification } ;

    is called an anonymous union; it defines an unnamed type and an unnamed object of unnamed that type called an anonymous union object. Each member-declaration in the member-specification of an anonymous union

    ...
Date: 2017-02-06.00:00:00

Additional note, October, 2015:

This issue is expected to be addressed by the wording of N4532 or a successor thereof (“Default Comparisons”).

Date: 2017-02-15.00:00:00

[Adopted at the February/March, 2017 meeting.]

The term “direct member” is used in 11.5 [class.union] paragraph 8 but is not defined. It might be better to refer to the class's member-specification instead.

History
Date User Action Args
2018-02-27 00:00:00adminsetstatus: ready -> c++17
2017-02-06 00:00:00adminsetmessages: + msg5719
2017-02-06 00:00:00adminsetmessages: + msg5718
2017-02-06 00:00:00adminsetstatus: drafting -> ready
2014-07-07 00:00:00adminsetstatus: open -> drafting
2014-02-13 00:00:00admincreate