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

Strengthen exception specification for complex #3880

Merged
merged 8 commits into from
Jul 26, 2023

Conversation

frederick-vs-ja
Copy link
Contributor

Conditional noexcept specifications make the strengthening only applied to complex<float>, complex<double>, and complex<long double>. Not sure whether unconditional noexcept would be better (should be OK since complex<SomeOtherType> has unspecified effects).

This PR is currently adding noexcept to some internal functions declared in <ymath.h> and some other functions called by them. I hope this is not too aggressive.

Conditional `noexcept` specifications make the strengthening only
applied to `complex<float>`, `complex<double>`, and
`complex<long double>`.
@frederick-vs-ja frederick-vs-ja requested a review from a team as a code owner July 16, 2023 13:58
@CaseyCarter CaseyCarter added the enhancement Something can be improved label Jul 17, 2023
@StephanTLavavej StephanTLavavej self-assigned this Jul 18, 2023
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.

This looks good to me!

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...

stl/inc/complex Outdated Show resolved Hide resolved
stl/inc/complex Outdated Show resolved Hide resolved
stl/src/xmath.hpp Outdated Show resolved Hide resolved
@StephanTLavavej
Copy link
Member

@strega-nil-ms FYI, I pushed minor fixes and moderate-size noexcept additions to xmath.hpp and its implementation files after you approved.

Also, I noticed that _FPoly and _LDnorm were never defined, so I removed their declarations. I verified that the export surfaces of the release and debug DLLs are unchanged.

@StephanTLavavej StephanTLavavej removed their assignment Jul 21, 2023
@StephanTLavavej StephanTLavavej self-assigned this Jul 25, 2023
@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 96c0752 into microsoft:main Jul 26, 2023
35 checks passed
@StephanTLavavej
Copy link
Member

🦾 🧮 🧑‍🏫

@frederick-vs-ja frederick-vs-ja deleted the complex-noexcept branch July 26, 2023 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Something can be improved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants