C++ Logo

std-proposals

Advanced search

Re: [std-proposals] std::launder when multiple objects of the same type exist at the same address

From: Halalaluyafail3 <luigighiron_at_[hidden]>
Date: Wed, 17 Dec 2025 14:09:24 -0500
If that paper will fix this issue then I will hold off on making an issue for
this.

On Wed, Dec 17, 2025 at 5:20 AM M.P. <dbc_at_[hidden]> wrote:
>
> 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.
>
>

Received on 2025-12-17 19:11:52