Date: Wed, 17 Dec 2025 10:20:20 -0000
Two objects of similar types having the same address is the subject of
CWG2744, although the description of that issue seems a bit
undermotivated. (I don't see how this situation contradicts
[intro.object] paragraph 9 (nowadays paragraph 10), personally.)
Imbuing std::launder with the same kind of angelic nondeterminism as
used by implicit object creation and related facilities (i.e., making
it yield a pointer to whichever S would give your program defined
behavior, if any) should make this case work, and is already proposed
as part of P1839.
CWG2744, although the description of that issue seems a bit
undermotivated. (I don't see how this situation contradicts
[intro.object] paragraph 9 (nowadays paragraph 10), personally.)
Imbuing std::launder with the same kind of angelic nondeterminism as
used by implicit object creation and related facilities (i.e., making
it yield a pointer to whichever S would give your program defined
behavior, if any) should make this case work, and is already proposed
as part of P1839.
Received on 2025-12-17 10:20:51
