Second Draft: Placement New Expression

Walter Bright newshound2 at digitalmars.com
Wed Nov 20 01:49:23 UTC 2024


On 11/19/2024 11:02 AM, Paul Backus wrote:
> Using a typed lvalue instead of void[] is just asking to shoot yourself in the 
> foot, especially when it comes to const/immutable:

This (and some other reasons) is why placement new will not be allowed in @safe 
code. The compiler will never be able to properly vet the provenance of the 
memory being overwritten by placement new.


More information about the dip.development mailing list