[Issue 24644] New: write functions should handle invalid bool values specially
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jul 2 16:16:56 UTC 2024
https://issues.dlang.org/show_bug.cgi?id=24644
Issue ID: 24644
Summary: write functions should handle invalid bool values
specially
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: qs.il.paperinik at gmail.com
Functions of the family write(f)?(ln)? should handle invalid `bool` values
(i.e. ones whose bit pattern isn’t `0x00` or `0x01`) by printing `__bool(0x??)`
with `??` replaced by the hex value. For formatted write functions, that
applies to the `%s` format. Numeric formats such as `%d`, `%x`, etc., already
print the correct (bit-pattern) value.
This would make debugging invalid bool values a lot easier.
--
More information about the Digitalmars-d-bugs
mailing list