D's policy on hidden memory allocations and nothrow @nogc
Per Nordlöw
per.nordlow at gmail.com
Wed Sep 5 21:11:45 UTC 2018
On Wednesday, 5 September 2018 at 21:06:07 UTC, Adam D. Ruppe
wrote:
> It doesn't affect @nogc because the function above will throw a
> statically-allocated object instead of creating a new one (if
> it is out of memory, where would it allocate a new one anyway?).
>
> It doesn't affect nothrow because it is considered a fatal
> Error instead of a recoverable Exception.
>
>> And how does this relate to instead using `assert`s and
>> DIP-1008?
>
> assert works by similar rules and is thus unaffected by those
> things too.
Thanks!
More information about the Digitalmars-d
mailing list