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

Fix for std::numeric_limits<std::_Signed128>::is_signed #3291

Merged
merged 2 commits into from
Jan 11, 2023

Conversation

mtezych
Copy link
Contributor

@mtezych mtezych commented Dec 15, 2022

Hello,

I've noticed that the MSVC's STL provides std::numeric_limits template specialization
for the std::_Signed128 (a type which models the signed-integer-class concept) slightly incorrectly,
that is the std::numeric_limits<std::_Signed128>::is_signed is false instead of true:

This change fixes that issue and adds a couple of compile-time checks
verifying that the std::numeric_limits<std::_Signed128> is properly specialized.

@mtezych mtezych requested a review from a team as a code owner December 15, 2022 23:10
@CaseyCarter CaseyCarter added the bug Something isn't working label Dec 15, 2022
Copy link
Member

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

Thanks for fixing my mistake!

stl/inc/__msvc_int128.hpp Outdated Show resolved Hide resolved
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.

Thanks for noticing!

@mtezych
Copy link
Contributor Author

mtezych commented Dec 16, 2022

@microsoft-github-policy-service agree

@StephanTLavavej StephanTLavavej self-assigned this Jan 11, 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 1b7ab6e into microsoft:main Jan 11, 2023
@StephanTLavavej
Copy link
Member

Thanks for fixing this bug, and congratulations on your first microsoft/STL commit! 🎉 😻 🚀

This will ship in VS 2022 17.6 Preview 2.

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
None yet
Development

Successfully merging this pull request may close these issues.

4 participants