Skip to content

Conversation

@ThomasFWise
Copy link
Contributor

@ThomasFWise ThomasFWise commented May 27, 2021

This can be important for performance on x86 when calling these functions from code that is marked noexcept.

Drive by: fix optional::operator CMP to correctly only expect an implicit conversion to bool; example fail: https://gcc.godbolt.org/z/xojTqn3vx

@ThomasFWise ThomasFWise requested a review from a team as a code owner May 27, 2021 17:48
@CaseyCarter CaseyCarter added the performance Must go faster label May 27, 2021
@SuperWig
Copy link
Contributor

If I'm not mistaken, if it's not specified as noexcept in the standard then they need to be commented as // strengthened to signify that.

@CaseyCarter CaseyCarter self-assigned this Jun 9, 2021
@StephanTLavavej
Copy link
Member

I've pushed a merge with main to resolve conflicts in <vector> after the toolset update removed _CONSTEXPR20_CONTAINER (it's now _CONSTEXPR20 or plain constexpr), followed by running clang-format.

@CaseyCarter
Copy link
Contributor

I merged main yet again and resolved a trivial conflict in <optional> where one of the recently removed banner comments appeared in the context around a change.

Copy link
Contributor

@CaseyCarter CaseyCarter left a comment

Choose a reason for hiding this comment

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

Publishing an ancient partial review.

… on x86 when calling these functions from code that is marked noexcept.
- AdamBucior: remove noexcept from compare operators on sequence types
- Casey:
   - _Implicitly_convert_to (_Fake_copy_init)
   - /* strengthened */
Additionally, this fixes a few existing XFAILs in libc++'s test suite
@StephanTLavavej
Copy link
Member

Merge conflicts need to be resolved now that #1347 has landed. 🛬

@strega-nil-ms
Copy link
Contributor

Merged (and fixed an issue I noticed while merging)

Copy link
Member

@StephanTLavavej StephanTLavavej left a comment

Choose a reason for hiding this comment

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

Thanks! I'll validate and push changes for the small issues I found (only one was significant, regarding a missing noexcept annotation on the tagged base class constructor).

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.

Marking request changes as I do not wish to merge without finishing the {_Implicitly_convert_to, _Fake_decay_copy, _Fake_copy_init} discussion.

@strega-nil-ms strega-nil-ms added the decision needed We need to choose something before working on this label Aug 17, 2022
@StephanTLavavej StephanTLavavej removed the decision needed We need to choose something before working on this label Aug 18, 2022
@StephanTLavavej
Copy link
Member

We've decided to go with @strega-nil-ms's proposed unification to _Fake_copy_init in a followup PR (to avoid mixing a large mechanical change with a behavioral change).

@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 ae0c274 into microsoft:main Aug 18, 2022
@StephanTLavavej
Copy link
Member

@ThomasFWise Thanks for strengthening these exception specifications, and congratulations on your first microsoft/STL commit!

Also thanks to @strega-nil-ms for landing this PR!

🎉 😻 🦾

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

Labels

performance Must go faster

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants