KEMBAR78
Improve std::complex formatter to be compatible with P2197R0 by phprus · Pull Request #3900 · fmtlib/fmt · GitHub
Skip to content

Conversation

@phprus
Copy link
Contributor

@phprus phprus commented Mar 19, 2024

P2197R0: https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p2197r0.html

Effects: Equivalent to:

 format_to(ctx.out(), "{:<fill-align-width>}",
           format(c.real() != 0 ? "({0}+{1}i)" : "{1}i", real, imag))

Copy link
Contributor

@vitaut vitaut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one nit, otherwise LGTM.

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
@phprus phprus requested a review from vitaut March 20, 2024 12:29
@vitaut vitaut merged commit 45b772f into fmtlib:master Mar 20, 2024
@vitaut
Copy link
Contributor

vitaut commented Mar 20, 2024

Merged, thanks!

happymonkey1 pushed a commit to happymonkey1/fmt that referenced this pull request Apr 7, 2024
…3900)

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
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.

2 participants