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 and rename _Within_limits, add tests #3247

Merged
merged 3 commits into from
Dec 6, 2022

Conversation

strega-nil-ms
Copy link
Contributor

@strega-nil-ms strega-nil-ms commented Nov 29, 2022

Fixes #3244, I believe.

@strega-nil-ms strega-nil-ms requested a review from a team as a code owner November 29, 2022 20:27
@StephanTLavavej

This comment was marked as resolved.

@StephanTLavavej StephanTLavavej added bug Something isn't working high priority Important! labels Nov 29, 2022
@StephanTLavavej StephanTLavavej self-assigned this Nov 29, 2022
stl/inc/xutility Outdated Show resolved Hide resolved
stl/inc/xutility Outdated Show resolved Hide resolved
stl/inc/xutility Show resolved Hide resolved
stl/inc/xutility Outdated Show resolved Hide resolved
stl/inc/xutility Outdated Show resolved Hide resolved
stl/inc/xutility Outdated Show resolved Hide resolved
stl/inc/xutility Outdated Show resolved Hide resolved
@strega-nil-ms
Copy link
Contributor Author

I removed the optimization change; I'll open an issue for it.

@strega-nil-ms strega-nil-ms changed the title fix _Within_limits, add tests fix and rename _Within_limits, add tests Nov 30, 2022
@StephanTLavavej StephanTLavavej removed their assignment Dec 5, 2022
@StephanTLavavej StephanTLavavej dismissed CaseyCarter’s stale review December 5, 2022 22:25

Requested changes have been made

@StephanTLavavej StephanTLavavej self-assigned this Dec 5, 2022
@StephanTLavavej
Copy link
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

} else {
constexpr auto max_vt = numeric_limits<ValueType>::max();
if constexpr (ElementType{-1} == max_vt) {
// ugly conversions :(
Copy link
Member

Choose a reason for hiding this comment

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

Non-inclusive conversion shaming! (No change requested.)

@StephanTLavavej StephanTLavavej merged commit e5b008c into microsoft:main Dec 6, 2022
@StephanTLavavej
Copy link
Member

Thanks for fixing this runtime correctness regression! 🛠️ 😻 ✅

@strega-nil-ms strega-nil-ms deleted the find-count-neg-one branch December 19, 2022 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high priority Important!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

<algorithm>: find()/count() (classic/ranges) regression finding -1 in unsigned int elements
4 participants