Creating immutable arrays in @safe code

H. S. Teoh hsteoh at quickfur.ath.cx
Fri Jul 16 22:27:31 UTC 2021


On Fri, Jul 16, 2021 at 10:23:31PM +0000, Dennis via Digitalmars-d-learn wrote:
> On Friday, 16 July 2021 at 20:45:11 UTC, H. S. Teoh wrote:
> > Have you tried `pure`?
> 
> The code in question is all `@safe pure nothrow`.

Hmm, OK. Not sure why .array isn't being inferred as unique... but yeah,
you probably have to resort to using @trusted with .assumeUnique.


T

-- 
Тише едешь, дальше будешь.


More information about the Digitalmars-d-learn mailing list