Title
Array as first non-static data member in standard-layout class
Status
cd4
Section
Clause [11] [class]
Submitter
Hubert Tong

Created on 2015-05-06.00:00:00 last changed 95 months ago

Messages

Date: 2015-10-15.00:00:00

[Moved to DR at the October, 2015 meeting.]

Date: 2015-05-15.00:00:00

Proposed resolution (May, 2015):

Change Clause 11 [class] paragraph 7 as follows:

...M(X) is defined as follows:

  • If X is a non-union class type, the set M(X) is empty if X has no (possibly inherited ( 11.7 [class.derived])) non-static data members; otherwise, it consists of the type of the first non-static data member of X (where said member may be an anonymous union), X0, and the elements of M(X0).

  • If X is a union type, the set M(X) is the union of all M(Ui) and the set containing all Ui, where each Ui is the type of the ith non-static data member of X.

  • If X is an array type with element type Xe, the set M(X) consists of Xe and the elements of M(Xe).

  • If X is a non-class, non-array type, the set M(X) is empty.

[Note: M(X) is the set of the types of all non-base-class subobjects that are guaranteed in a standard-layout class to be at a zero offset in X. —end note]

Date: 2015-05-06.00:00:00

The specification for determining whether a derived class is a standard-layout class, considering the types of its bases and those associated with its initial member, overlooked the case of a class whose first member is an array.

History
Date User Action Args
2017-02-06 00:00:00adminsetstatus: dr -> cd4
2015-11-10 00:00:00adminsetmessages: + msg6074
2015-11-10 00:00:00adminsetstatus: ready -> dr
2015-05-25 00:00:00adminsetmessages: + msg5457
2015-05-06 00:00:00admincreate