Skip to content

fix and rename _Within_limits, add tests - #3247

Merged
Stephan T. Lavavej (StephanTLavavej) merged 3 commits into
microsoft:mainfrom
strega-nil:find-count-neg-one
Dec 6, 2022
Merged

Stephan T. Lavavej (StephanTLavavej) merged 3 commits into
microsoft:mainfrom
strega-nil:find-count-neg-one

Conversation

@strega-nil-ms

@strega-nil-ms nicole mazzuca (strega-nil-ms) commented Nov 29, 2022 •

Copy link
Copy Markdown
Contributor

Fixes #3244, I believe.

@StephanTLavavej

This comment was marked as resolved.

@StephanTLavavej Stephan T. Lavavej (StephanTLavavej) added bug Something isn't working high priority Important! labels Nov 29, 2022
Comment thread stl/inc/xutility Outdated
Comment thread stl/inc/xutility Outdated
Comment thread tests/std/tests/Dev11_0316853_find_memchr_optimization/test.cpp Outdated
Comment thread tests/std/tests/Dev11_0316853_find_memchr_optimization/test.cpp
Comment thread tests/std/tests/Dev11_0316853_find_memchr_optimization/test.cpp Outdated
Comment thread tests/std/tests/Dev11_0316853_find_memchr_optimization/test.cpp
Comment thread stl/inc/xutility
Comment thread stl/inc/xutility Outdated
Comment thread stl/inc/xutility Outdated
Comment thread stl/inc/xutility Outdated
Comment thread stl/inc/xutility Outdated
@strega-nil-ms

Copy link
Copy Markdown
Contributor Author

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

@StephanTLavavej

Copy link
Copy Markdown
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::max();
if constexpr (ElementType{-1} == max_vt) {
// ugly conversions :(

Copy link
Copy Markdown
Contributor

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
Stephan T. Lavavej (StephanTLavavej) merged commit e5b008c into microsoft:main Dec 6, 2022
@StephanTLavavej

Copy link
Copy Markdown
Member

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

@strega-nil-ms
nicole mazzuca (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.

: find()/count() (classic/ranges) regression finding -1 in unsigned int elements

4 participants