www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16240] New: std.exception.enforce should be nothrow when


          Issue ID: 16240
           Summary: std.exception.enforce should be nothrow when throwing
           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()

Jul 06 2016