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


1860. What is a “direct member?”

Section: 11.5  [class.union]     Status: C++17     Submitter: Dawn Perchik     Date: 2014-02-13

[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.

Additional note, October, 2015:

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

Proposed resolution (November, 2016):

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

  2. The elements of an aggregate are:

  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

    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

    ...