-
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
Workaround Devcom-1559808 in ranges::sort #2290
Conversation
If there's one thing that _must_ work in C++, it's sorting `vector` =)
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.
Also occurs in:
Lines 2639 to 2643 in d8f03cf
auto [_Match, _Mid1] = | |
_Equal_rev_pred(_Candidate, _First2, _First2 + _Count2, _Pred, _Proj1, _Proj2); | |
if (_Match) { | |
return {_STD move(_Candidate), _STD move(_Mid1)}; | |
} |
Lines 5715 to 5720 in d8f03cf
for (; _Count1 >= _Count2; ++_First1, (void) --_Count1) { | |
auto [_Match, _Mid1] = _RANGES _Equal_rev_pred(_First1, _First2, _Last2, _Pred, _Proj1, _Proj2); | |
if (_Match) { | |
return {_STD move(_First1), _STD move(_Mid1)}; | |
} | |
} |
Lines 3780 to 3784 in d8f03cf
auto [_Begin, _End] = _RANGES search(subrange{_Current, _Last}, _Parent->_Pattern); | |
if (_Begin != _Last && _RANGES empty(_Parent->_Pattern)) { | |
++_Begin; | |
++_End; | |
} |
Lines 3826 to 3830 in d8f03cf
auto [_Begin, _End] = _RANGES search(subrange{_It, _Last}, _Pattern); | |
if (_Begin != _Last && _RANGES empty(_Pattern)) { | |
++_Begin; | |
++_End; | |
} |
It looked like this was ready for review, so I went ahead and pushed minor changes. Please meow if you were still working on this! 🐱 |
Reviewer note: I just inadvertently pushed a commit into this branch, and then force-pushed it back to e88474f. Hopefully this didn't reset incremental review. |
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 fixing these bugs! 🔧 🐞 😻 |
Did a post-commit review and all looks good! (Just for the record 📝) |
If there's one thing that must work in C++, it's sorting
vector
=)For ease of review: DevCom-1559808.
This also moves
_Rewrap_subrange
to<xutility>
because it's already being used there:STL/stl/inc/xutility
Line 5674 in ee5a216