[Issue 6377] New: std.conv.to should check range when changing signedness

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jul 24 15:54:36 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=6377

           Summary: std.conv.to should check range when changing
                    signedness
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: thecybershadow at gmail.com


--- Comment #0 from Vladimir Panteleev <thecybershadow at gmail.com> 2011-07-24 15:54:35 PDT ---
import std.conv, std.exception;

void main()
{
    int b = -1;
    assertThrown!ConvException(to!uint(b));
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list