Skip to content

Conversation

fsb4000
Copy link
Contributor

@fsb4000 fsb4000 commented Jan 18, 2024

Fixes #4319

libcxx\test\std\utilities\format\format.functions\locale-specific_form.pass.cpp is still failing after this fix.

Format string   {:$<11.6Lg}
Expected output 1,234.57$$$
Actual output   1,234.57$$$$

I guess, it's a different bug, isn't it?

@fsb4000 fsb4000 requested a review from a team as a code owner January 18, 2024 02:01
@frederick-vs-ja
Copy link
Contributor

libcxx\test\std\utilities\format\format.functions\locale-specific_form.pass.cpp is still failing.

Format string   {:$<11.6Lg}
Expected output 1,234.57$$$
Actual output   1,234.57$$$$

I guess, it's a different bug, isn't it?

Looks like #4316.

@StephanTLavavej StephanTLavavej added bug Something isn't working format C++20/23 format labels Jan 18, 2024
@StephanTLavavej StephanTLavavej self-assigned this Jan 18, 2024
@StephanTLavavej
Copy link
Member

Thanks! I looked into using <charconv>'s internal convention of using chars_format{} to signal "plain shortest" with an in-band special value, but the following logic in <format> would require additional adjustments and I felt that it was more risky than your fix.

@StephanTLavavej
Copy link
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej StephanTLavavej merged commit cdf6096 into microsoft:main Jan 25, 2024
@StephanTLavavej
Copy link
Member

Thanks for fixing this libcxx failure - all shall love shortest round-trip and despair! ❤️ 😹 🛠️

@fsb4000 fsb4000 deleted the fix4319 branch January 25, 2024 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working format C++20/23 format
Projects
None yet
Development

Successfully merging this pull request may close these issues.

<format>: incorrect output for some floating-point values
3 participants