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: [email protected]
Reporter: [email protected]
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();
}
--