C++ Logo

std-discussion

Advanced search

Re: Is it valid use reinterpret_cast to form pointer to object?

From: Bjorn Reese <breese_at_[hidden]>
Date: Tue, 1 Aug 2023 11:30:28 +0200
On 8/1/23 02:21, Ville Voutilainen via Std-Discussion wrote:

> That should also have nothing to do with start_lifetime_as, because
> that placement-new plus the later address-obtaining and use
> should work even for non trivial types, for any T, regardless of
> whether trivial or complex, so start_lifetime_as doesn't solve
> any problems here anyway.

Notice that the OP is asking about the case where placement-new is
omitted.

Received on 2023-08-01 09:30:32