Array Indexing/Slicing Range Checking, Exceptions and @nogc

ag0aep6g via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Mar 30 06:24:20 PDT 2016


On 30.03.2016 15:12, Nordlöw wrote:
> https://github.com/nordlow/justd/blob/master/packedarray.d

 From there:

>     this(R)(R values, bool assumeSortedParameter = false) @trusted nothrow @("complexity", "O(n*log(n))")
>         if (isInputRange!R)

This is off topic, but don't mark templates like that @trusted. By doing 
so you also trust R, but you don't know if it's memory safe.


More information about the Digitalmars-d-learn mailing list