How do you debug @safe @nogc code? Can't figure out how to print.

Nicholas Wilson iamthewilsonator at hotmail.com
Sat Nov 17 13:46:00 UTC 2018


On Saturday, 17 November 2018 at 13:13:36 UTC, aliak wrote:
> On Friday, 16 November 2018 at 13:21:39 UTC, Stanislav Blinov 
> wrote:
>> auto assumeNoGC(T)(return scope T t) @trusted { /* ... */ }
>
> Sawweet! Thanks, that made the printing possible!
>
> "scope" is const from what I understand right? It works without 
> scope as well. So just "return T".

No, `in` used to mean const scope.

scope means roughly "this thing does not escape this function" 
e.g. assigning to global variables.


More information about the Digitalmars-d-learn mailing list