First Draft: Placement New Expression
Paul Backus
snarwin at gmail.com
Thu Oct 31 18:21:13 UTC 2024
On Thursday, 31 October 2024 at 18:17:56 UTC, Nick Treleaven
wrote:
> On Thursday, 31 October 2024 at 06:23:24 UTC, Walter Bright
> wrote:
>> Based on a suggestion by Manu Evans:
>>
>> https://github.com/WalterBright/documents/blob/5d65426a4e5c434d571e76ae800a267a610bf394/placementnew.md
>
>> With the placement new expression, operator new can initialize
>> an object into any location. It replaces the functionality of
>> core.lifetime.emplace.
>
> It would be good if any DIP that replaces `emplace` could avoid
> violation of immutable data in @system code, or at least in
> @safe:
> https://issues.dlang.org/show_bug.cgi?id=24795
Easiest way to do this is to allow using a `void[]` for all
types, not just classes.
More information about the dip.development
mailing list