docs: note std::format vs fmt difference for 'a' format

Document that hexadecimal floating-point formatting includes 0x/0X in
{fmt} but not in std::format (fixes #4657).
This commit is contained in:
wuyangfan 2026-05-26 22:12:46 +08:00
parent 0acf106c52
commit 1952dafd73

View File

@ -715,6 +715,11 @@ following differences:
(ignoring redundant digits and sign in exponent) and may produce more (ignoring redundant digits and sign in exponent) and may produce more
decimal digits than necessary. decimal digits than necessary.
- For the `'a'`/`'A'` presentation types, {fmt} includes the `0x`/`0X`
prefix in the output (like `printf`'s `%a`), while `std::format` output
for hexadecimal floating-point values is specified in terms of
`std::to_chars` and does not include that prefix.
## Configuration Options ## Configuration Options
{fmt} provides configuration via CMake options and preprocessor macros to {fmt} provides configuration via CMake options and preprocessor macros to