www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13163] New: std.conv.parse misses overflow when it results in

https://issues.dlang.org/show_bug.cgi?id=13163

          Issue ID: 13163
           Summary: std.conv.parse misses overflow when it results in the
                    same value
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: Phobos
          Assignee: nobody puremagic.com
          Reporter: nilsbossung googlemail.com

import std.conv;
import std.exception;
void main()
{
    auto s = "fff";
    assertThrown!ConvOverflowException(s.parse!ubyte(16)); /* fails */
}

Pull request is on the way.

--
Jul 19 2014