docs: note std::format hex float 0x prefix difference

Document that fmt's 'a'/'A' presentation adds a 0x/0X prefix while
std::format (via std::to_chars) does not. Closes #4657.
This commit is contained in:
wuyangfan 2026-05-17 22:25:01 +08:00
parent 2f18a88e68
commit 0961daacaa

View File

@ -715,6 +715,10 @@ following differences:
(ignoring redundant digits and sign in exponent) and may produce more
decimal digits than necessary.
- For the hexadecimal floating-point presentation types (`'a'`/`'A'`),
{fmt} includes a `0x`/`0X` prefix (similar to `printf`'s `%a`), while
`std::format` follows `std::to_chars` and omits the prefix.
## Configuration Options
{fmt} provides configuration via CMake options and preprocessor macros to