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 {
2426
2426
// |=======|????????|========|??????...
2427
2427
2428
2428
--_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
2430
2434
++_Mid2;
2431
2435
const auto _Delta = _RANGES distance(_First, _Mid2);
2432
2436
@@ -2441,11 +2445,6 @@ namespace ranges {
2441
2445
_Mid1 = _Last;
2442
2446
_RANGES advance(_Last, _Delta);
2443
2447
_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)};
2449
2448
}
2450
2449
}
2451
2450
} else {
You can’t perform that action at this time.
0 commit comments