digitalmars.D.bugs - [Issue 16240] New: std.exception.enforce should be nothrow when
- via Digitalmars-d-bugs (27/27) Jul 06 2016 https://issues.dlang.org/show_bug.cgi?id=16240
https://issues.dlang.org/show_bug.cgi?id=16240 Issue ID: 16240 Summary: std.exception.enforce should be nothrow when throwing errors Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: phobos Assignee: nobody puremagic.com Reporter: jack jackstouffer.com void test() nothrow { import std.exception : enforce; import core.exception : RangeError; // this line doesn't compile // enforce!RangeError(false); version(assert) if (false) throw new RangeError(); } void main() { test(); } --
Jul 06 2016