[Issue 16240] New: std.exception.enforce should be nothrow when throwing errors
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Jul 6 06:16:21 PDT 2016
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 at puremagic.com
Reporter: jack at 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();
}
--
More information about the Digitalmars-d-bugs
mailing list