Skip to content

Commit a0c8e90

Browse files
burblebeetkoeppe
authored andcommitted
LWG3505 split_view::outer-iterator::operator++ misspecified
1 parent 21de0b0 commit a0c8e90

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

source/ranges.tex

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5674,11 +5674,17 @@
56745674
if (@\placeholder{current}@ == end) return *this;
56755675
const auto [pbegin, pend] = subrange{@\exposid{parent_}@->@\exposid{pattern_}@};
56765676
if (pbegin == pend) ++@\placeholder{current}@;
5677+
else if constexpr (@\exposconcept{tiny-range}@<Pattern>) {
5678+
@\placeholder{current}@ = ranges::find(std::move(@\placeholder{current}@), end, *pbegin);
5679+
if (@\placeholder{current}@ != end) {
5680+
++@\placeholder{current}@;
5681+
}
5682+
}
56775683
else {
56785684
do {
5679-
auto [b, p] = ranges::mismatch(std::move(@\placeholder{current}@), end, pbegin, pend);
5680-
@\placeholder{current}@ = std::move(b);
5685+
auto [b, p] = ranges::mismatch(@\placeholder{current}@, end, pbegin, pend);
56815686
if (p == pend) {
5687+
@\placeholder{current}@ = b;
56825688
break; // The pattern matched; skip it
56835689
}
56845690
} while (++@\placeholder{current}@ != end);

0 commit comments

Comments
 (0)