Skip to content

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

Open
leno23 wants to merge 1 commit into
fmtlib:mainfrom
leno23:docs/4657-hex-float-a-prefix-diff
Open

docs: note std::format vs fmt difference for 'a' format#4784
leno23 wants to merge 1 commit into
fmtlib:mainfrom
leno23:docs/4657-hex-float-a-prefix-diff

Conversation

@leno23
Copy link
Copy Markdown

@leno23 leno23 commented May 26, 2026

Fixes #4657

Adds a bullet to the "differences from std::format" section in doc/api.md explaining that 'a'/'A' output in {fmt} includes the 0x/0X prefix (like printf %a), while std::format hexadecimal floating-point formatting via std::to_chars does not.

Example: https://godbolt.org/z/TaK4s5YTM

Made with Cursor

Document that hexadecimal floating-point formatting includes 0x/0X in
{fmt} but not in std::format (fixes fmtlib#4657).
@leno23
Copy link
Copy Markdown
Author

leno23 commented May 26, 2026

Friendly bump: this documents the 0x prefix difference for 'a' format vs std::format (see Godbolt in #4657). Happy to adjust wording if maintainers prefer a different section.

@leno23
Copy link
Copy Markdown
Author

leno23 commented May 26, 2026

Docs-only clarification for #4657 — ready for review when you have time.

@leno23
Copy link
Copy Markdown
Author

leno23 commented May 26, 2026

Docs clarification for 'a' format — ready for review.

@leno23
Copy link
Copy Markdown
Author

leno23 commented May 26, 2026

Docs for 'a' format — ready for review when convenient.

@leno23
Copy link
Copy Markdown
Author

leno23 commented May 26, 2026

Clarifies 'a' vs std::format — docs-only, CI green. Ready for review.

@leno23
Copy link
Copy Markdown
Author

leno23 commented May 26, 2026

Docs-only — CI green, ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Difference in hexadecimal floating-point (a) format between fmt and std isn't documented

1 participant