On Thursday, 11 September 2025 at 17:16:35 UTC, Paul Backus wrote:
```d
void inferSystem() @system pure nothrow @nogc {}

T* example(T)() {
    static if (!isSafe!(() { new T(); })
        inferSystem();
    return (() @trusted => new (new void[](T.sizeof)) T())();
}
```

Unfortunately that would give you an incredibly unhelpful error message.
  • Placement new an... IchorDev via Digitalmars-d-learn
    • Re: Placeme... Dennis via Digitalmars-d-learn
      • Re: Pla... Paul Backus via Digitalmars-d-learn
        • Re:... IchorDev via Digitalmars-d-learn
      • Re: Pla... IchorDev via Digitalmars-d-learn
    • Re: Placeme... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
      • Re: Pla... IchorDev via Digitalmars-d-learn
        • Re:... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
          • ... IchorDev via Digitalmars-d-learn
            • ... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
              • ... IchorDev via Digitalmars-d-learn
                • ... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
                • ... IchorDev via Digitalmars-d-learn
            • ... Paul Backus via Digitalmars-d-learn

Reply via email to