Placement new and @trusted

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Thu Sep 11 03:47:02 UTC 2025


On 11/09/2025 3:27 AM, IchorDev wrote:
> On Wednesday, 10 September 2025 at 14:45:52 UTC, Richard (Rikki) Andrew 
> Cattermole wrote:
>> The caller is responsible for guaranteeing that the memory passed in 
>> is uninitialized, and that behavior is @system.
> 
> Yeah but I should be able to mark it as `@trusted` without trusting some 
> random bloody constructor as well. Apparently nobody thought to use a 
> syntax that allows marking one but not the other? This is why we need to 
> use the DIP process to add new features like this.

It did go through the DIP process.

What has not gone through the DIP process is attributes like 
@localtrusted which would be more akin to what you're asking about.


More information about the Digitalmars-d-learn mailing list