0x prefix for hexadecimal and pretty-printed Debug cannot be specified separately in std::fmt #75766
Labels
C-feature-request
Category: A feature request, i.e: not implemented / a PR.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
In
std::fmt
:x
prints integers in hexadecimal format#x
prefixes hexadecimal numbers with a 0x#?
pretty-prints the Debug formatting (e.g. one vector element per line)The problem is that those are not orthogonal.
#x?
will both add 0x and pretty-print. There does not seem to be a way to get one behavior without the other.Could the
#
modifier apply only to the closest type, so that#x?
,x#?
and#x#?
could be used to denote each case? (this would cause an output change for#x?
). Alternatively, another letter to denote "hexadecimal with 0x prefix"?The text was updated successfully, but these errors were encountered: