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

<xlocale>: _Uglify non-conforming locale::c_str() #3088

Merged
merged 2 commits into from
Sep 13, 2022

Conversation

frederick-vs-ja
Copy link
Contributor

@frederick-vs-ja frederick-vs-ja commented Sep 8, 2022

And add noexcept to it. Fixes #3087.

I hope the existing uses of this extension are sufficiently rare. The noexcept doesn't seem quite useful, since the _C_str member (after change) is only called within potentially-throwing functions, but it may reduce compiler's unhappiness caused by C26440 under some conditions (reported in #3081).

@frederick-vs-ja frederick-vs-ja requested a review from a team as a code owner September 8, 2022 11:31
@frederick-vs-ja frederick-vs-ja changed the title <xlocale>: _Uglify non-conforming locale::c_str() <xlocale>: _Uglify non-conforming locale::c_str() Sep 8, 2022
@StephanTLavavej StephanTLavavej added the bug Something isn't working label Sep 8, 2022
@StephanTLavavej
Copy link
Member

This is old, so it has some potential to break real-world code, but let's try it.

@StephanTLavavej StephanTLavavej added this to Final Review in Code Reviews Sep 8, 2022
Copy link
Contributor

@strega-nil-ms strega-nil-ms left a comment

Choose a reason for hiding this comment

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

I'm very down to try this; we can always revert if it ends up being worse than we thought.

@strega-nil-ms strega-nil-ms moved this from Final Review to Ready To Merge in Code Reviews Sep 12, 2022
@StephanTLavavej StephanTLavavej self-assigned this Sep 12, 2022
@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 6cd74fd into microsoft:main Sep 13, 2022
Code Reviews automation moved this from Ready To Merge to Done Sep 13, 2022
@StephanTLavavej
Copy link
Member

Thanks for noticing and fixing this ancient nonconformance! 😻 🦅 ✅

@frederick-vs-ja frederick-vs-ja deleted the _Uglify-locale-c_str branch September 13, 2022 23:33
CaseyCarter pushed a commit to CaseyCarter/STL that referenced this pull request Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

<xlocale>: Non-conforming locale::c_str()
3 participants