File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -2426,7 +2426,11 @@ namespace ranges {
24262426 // |=======|????????|========|??????...
24272427
24282428 --_Mid2;
2429- if (!_STD invoke(_Pred, _STD invoke(_Proj, *_Mid2), _Val)) { // mismatch; skip past it
2429+ if (_STD invoke(_Pred, _STD invoke(_Proj, *_Mid2), _Val)) {
2430+ if (_Mid2 == _Mid1) { // [_Mid1, _Mid2) is empty, so [_First, _Last) all match
2431+ return {_STD move(_First), _STD move(_Last)};
2432+ }
2433+ } else { // mismatch; skip past it
24302434 ++_Mid2;
24312435 const auto _Delta = _RANGES distance(_First, _Mid2);
24322436
@@ -2441,11 +2445,6 @@ namespace ranges {
24412445 _Mid1 = _Last;
24422446 _RANGES advance(_Last, _Delta);
24432447 _Mid2 = _Last;
2444- continue;
2445- }
2446-
2447- if (_Mid2 == _Mid1) { // [_Mid1, _Mid2) is empty, so [_First, _Last) all match
2448- return {_STD move(_First), _STD move(_Last)};
24492448 }
24502449 }
24512450 } else {
You can’t perform that action at this time.
0 commit comments