Throw in a pre-condition of a nothrow function

Rob T alanb at ucora.com
Fri Mar 8 11:59:58 PST 2013


On Friday, 8 March 2013 at 19:39:47 UTC, bearophile wrote:
> Currently this code compiles:
[...]

Nice edge case to test the compiler with.

Definitely looks like a bug. It should not compile given the 
nothrow attrib.

If it was throwable, what to do about throwing a null reference 
is an interesting question.

--rt


More information about the Digitalmars-d-learn mailing list