On Wednesday, 10 September 2025 at 12:41:22 UTC, Richard (Rikki) Andrew Cattermole wrote:
Your calling a @system function (constructor) from a safe function (main).

Placement new doesn't change the rules around this.

You don't understand: I *WANT* the code *FAIL* to compile because `S`'s constructor is `@system`. But instead, the `@system` constructor gets through because I had to use `@trusted` to get placement new itself to be considered safe. If I have to manually check constructor safety to get around this then I might as well just use `emplace`, which would make this a completely worthless feature.
  • 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
              • ... IchorDev via Digitalmars-d-learn
                • ... Nick Treleaven via Digitalmars-d-learn

Reply via email to