www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21759] New: std.experimental.checkedint.Checked is not

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

          Issue ID: 21759
           Summary: std.experimental.checkedint.Checked is not compatible
                    with "%d" and "%x" integer format specifiers
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: n8sh.secondary hotmail.com

Demonstration:

---
import std.stdio;
import std.experimental.checkedint;

void main()
{
    writefln("%02d", checked(2L));
}
---

Compilation fails with message:

[...]/phobos/std/format.d(4069): Expected '%s' format specifier for type
'Checked!(long, Abort)'

--
Mar 24