-
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
Add missed increment of _Current in the early return path #1561
Conversation
539e12d
to
13a8617
Compare
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.
Thanks for fixing this correctness bug! I'll push a small comment change.
|
||
auto result = unique(wrapped_input.begin(), wrapped_input.end(), countedEq, get_second); | ||
STATIC_ASSERT(same_as<decltype(result), subrange<iterator_t<ReadWrite>>>); | ||
assert(result.empty()); |
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.
Observation, no change requested: This could be more strict, by verifying that the empty subrange is at the end. However, it's unlikely that we'll damage this (and this PR certainly isn't), so it's just something to keep in mind for future tests.
Thanks a lot @StephanTLavavej |
Thanks for this uniquely awesome bugfix! 😹 🪲 |
Fixes #1560
When avoiding an superfluous comparison we missed to add the necessary increment to exclude the first element of the last group.