This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115e. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-11-11


1858. Comparing pointers to union members

Section: 7.6.10  [expr.eq]     Status: CD4     Submitter: Richard Smith     Date: 2014-02-12

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

Comparison of pointers to members is currently specified in 7.6.10 [expr.eq] paragraph 3 as,

two pointers to members compare equal if they would refer to the same member of the same most derived object (6.7.2 [intro.object]) or the same subobject if indirection with a hypothetical object of the associated class type were performed, otherwise they compare unequal.

The “same member” requirement could be interpreted as incorrect for union members. The wording should be clarified in this regard.

Proposed Resolution (July, 2014):

Insert the following before bullet 5 of 7.6.10 [expr.eq] paragraph 3: