Bug 21759 – std.experimental.checkedint.Checked is not compatible with "%d" and "%x" integer format specifiers

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-03-24T14:57:40Z
Last change time
2021-03-24T23:04:08Z
Keywords
pull
Assigned to
No Owner
Creator
Nathan S.
Blocks
21169

Comments

Comment #0 by n8sh.secondary — 2021-03-24T14:57:40Z
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)'
Comment #1 by dlang-bot — 2021-03-24T15:06:10Z
@n8sh created dlang/phobos pull request #7910 "std.experimental.checkedint.Checked is not compatible with "%d" and "%x" integer format specifiers" fixing this issue: - Fix Issue 21759 - std.experimental.checkedint.Checked is not compatible with "%d" and "%x" integer format specifiers https://github.com/dlang/phobos/pull/7910
Comment #2 by dlang-bot — 2021-03-24T23:04:08Z
dlang/phobos pull request #7910 "std.experimental.checkedint.Checked is not compatible with "%d" and "%x" integer format specifiers" was merged into master: - 7ae1722f9165d47dd02ebbae9c6fb9d967e7237b by Nathan Sashihara: Fix Issue 21759 - std.experimental.checkedint.Checked is not compatible with "%d" and "%x" integer format specifiers https://github.com/dlang/phobos/pull/7910