Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement LWG-4084 std::fixed ignores std::uppercase #5151

Merged
merged 2 commits into from
Dec 5, 2024

Conversation

frederick-vs-ja
Copy link
Contributor

Fixes #5120.

It seems that the outputting Inf/NaN with uppercase was never tested before.

@frederick-vs-ja frederick-vs-ja requested a review from a team as a code owner November 26, 2024 18:51
@CaseyCarter CaseyCarter added the LWG Library Working Group issue label Nov 26, 2024
@StephanTLavavej StephanTLavavej self-assigned this Nov 26, 2024
auto s = (basic_ostringstream<CharT>{} << fixed << uppercase << numeric_limits<F>::quiet_NaN()).str();
assert(s == STATICALLY_WIDEN(CharT, "NAN"));
}
// also test other combinations
Copy link
Member

Choose a reason for hiding this comment

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

No change requested: This is almost repetitive enough to be worth extracting into table-based test cases, and/or extracting numeric_limits into constexpr constants, but each of them is still a single line and it's easy enough to see what's being tested.

@StephanTLavavej StephanTLavavej removed their assignment Dec 2, 2024
@StephanTLavavej StephanTLavavej self-assigned this Dec 3, 2024
@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 e0b8a11 into microsoft:main Dec 5, 2024
39 checks passed
@frederick-vs-ja frederick-vs-ja deleted the lwg-4084 branch December 5, 2024 06:51
@StephanTLavavej
Copy link
Member

THANKS FOR FIXING THIS BUG! 🛠️ 🧮 😹

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LWG Library Working Group issue
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

LWG-4084 std::fixed ignores std::uppercase
3 participants