From 1952dafd73c532e46ab082fd65b7a1c523d8810e Mon Sep 17 00:00:00 2001 From: wuyangfan <1102042793@qq.com> Date: Tue, 26 May 2026 22:12:46 +0800 Subject: [PATCH] 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). --- doc/api.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/api.md b/doc/api.md index ff190383..2b104dfa 100644 --- a/doc/api.md +++ b/doc/api.md @@ -715,6 +715,11 @@ following differences: (ignoring redundant digits and sign in exponent) and may produce more 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 {fmt} provides configuration via CMake options and preprocessor macros to