[Issue 21759] New: std.experimental.checkedint.Checked is not compatible with "%d" and "%x" integer format specifiers

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Mar 24 14:57:40 UTC 2021


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 at puremagic.com
          Reporter: n8sh.secondary at 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)'

--


More information about the Digitalmars-d-bugs mailing list