www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 15212] New: BigInt should implement opCast!long and opCast!int

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

          Issue ID: 15212
           Summary: BigInt should implement opCast!long and opCast!int
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: thecybershadow gmail.com

Currently, to convert a BigInt to a naked long/int, you have to call the
awkward toLong/toInt methods. The type should also provide these conversion
operations via opCast, so they are accessible to std.conv.to.

--
Oct 16 2015