Date: Tue, 10 Mar 2020 10:18:03 -0400
On Tue, Mar 10, 2020 at 4:13 AM Jens Gustedt via Liaison <
liaison_at_[hidden]> wrote:
> For C++ this is probably different because people are not supposed to
> use `malloc` but `new` which launches a constructor, but at the
> extreme you still have the same or similar rules, if I remember
> correctly.
>
In C++20, `malloc` now grants the ability for an initial type (for some
types) to be acquired later. A member access is sufficient in the C++ model
for the entire object to need to exist (thus affecting the initial type if
that does not conflict with previous accesses to the storage).
liaison_at_[hidden]> wrote:
> For C++ this is probably different because people are not supposed to
> use `malloc` but `new` which launches a constructor, but at the
> extreme you still have the same or similar rules, if I remember
> correctly.
>
In C++20, `malloc` now grants the ability for an initial type (for some
types) to be acquired later. A member access is sufficient in the C++ model
for the entire object to need to exist (thus affecting the initial type if
that does not conflict with previous accesses to the storage).
Received on 2020-03-10 09:21:05