Peter Alexander:
* Does @nogc => nothrow? If I'm not mistaken, throw must through a GC-allocated Throwable.* If the above is true, does that mean exceptions cannot be used at all in @nogc code?
This should work: void foo() @nogc nothrow { static const err = new Error("error"); throw err; } Bye, bearophile