Title
Inconsistency in definition of pointer-interconvertibility
Status
cd6
Section
6.8.4 [basic.compound]
Submitter
Jason Merrill

Created on 2021-07-29.00:00:00 last changed 19 months ago

Messages

Date: 2021-11-15.00:00:00

Proposed resolution (November, 2021):

Change 6.8.4 [basic.compound] bullet 4.3 as follows:

Two objects a and b are pointer-interconvertible if:

  • ...

  • one is a standard-layout class object and the other is the first non-static data member of that object, or, if the object has no non-static data members, any base class subobject of that object (11.4 [class.mem]), or

  • ...

Date: 2022-02-15.00:00:00

[Accepted at the February, 2022 meeting.]

The changes for issue 2254 included the following:

Change 6.8.4 [basic.compound] bullet 4.3 as follows:

Two objects a and b are pointer-interconvertible if:

  • ...

  • one is a standard-layout class object and the other is the first non-static data member of that object, or, if the object has no non-static data members, the first any base class subobject of that object (11.4 [class.mem]), or

This should also have removed the phrase,

or, if the object has no non-static data members,

since the change to 11.4 [class.mem] paragraph 25 specifies that all bases of a standard-layout class have the same address, regardless of whether the derived class has non-static data members.

History
Date User Action Args
2022-08-19 07:54:33adminsetstatus: dr -> cd6
2022-02-15 00:00:00adminsetstatus: ready -> dr
2021-11-15 00:00:00adminsetmessages: + msg6528
2021-07-29 00:00:00admincreate