-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 ranges::find_end return for bidi-common case #2270
Conversation
...and add full test coverage. Fixes microsoft#2268
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Obligatory "everything that is not tested is broken"
Fwd2 needle{good_needle}; | ||
const same_as<subrange<iterator_t<Fwd1>>> auto result = | ||
find_end(begin(haystack), end(haystack), begin(needle), end(needle), pred, get_first); | ||
STATIC_ASSERT( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick, is there a reason to shout STATIC_ASSERT
, at least in ranges code we should be able to be a bit less shouty
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes there is: I refuse to manually map from line number to failure condition when I can make MSVC do it for me by capitalizing static_assert
.
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed, or if more work is required. |
Thanks for finding the end of this bug! 🐞 🛑 😹 |
...and add full test coverage.
Fixes #2268