-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Remove remove_cv_t from standard integer type checks
#5946
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
Remove remove_cv_t from standard integer type checks
#5946
Conversation
|
@microsoft-github-policy-service agree [company="Centren Health"] |
|
@microsoft-github-policy-service agree |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
|
Also, @smundhra-git , write something like "fixes #5916" to make GitHub recognize that the given issue should be automatically closed when this PR is accepted. It also displays the issue differently in the list of issues. |
remove_cv_t from standard integer type checks
|
As @vmichal noted, I've gone ahead and edited your PR description to use GitHub's close/fix/resolve syntax, and removed the issue number from the PR title (as it doesn't turn into a link there, and isn't directly informative). |
|
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
|
Thanks for improving our conformance here, and congratulations on your first microsoft/STL commit! 😻 This will ship in the MSVC Build Tools 14.51, in a future update to VS 2026 18.x. By the way, it looks like you might be creating commits with an email address that isn't associated with your GitHub account. You can easily link them up so that the commits appear to come from you either way. I do this myself, as my personal machine is configured to create commits with my personal email address, versus my work machine with work email. Click on your avatar in the upper-right of GitHub > Settings > Emails, then add a secondary email address. |
Fixes #5916, the issue where cv-qualified integer types (e.g.,
const int,volatile unsigned int) were incorrectly accepted as standard integer types. When the standard says "signed or unsigned integer type" or "standard integer type", only cv-unqualified versions are included.Changes
remove_cv_twrapper from_Is_standard_integerinstl/inc/utility(line 952)remove_cv_twrapper from_Is_standard_unsigned_integerinstl/inc/__msvc_bit_utils.hpp(line 312)Impact
This fix ensures that:
std::cmp_less<const int, const int>is correctly rejectedstd::extents<const int, 42>is correctly rejected<bit>correctly reject cv-qualified typesChecklist
_Uglynaming convention (no changes needed - using existing identifiers)