Skip to content

Commit bcfa946

Browse files
authored
[range.split.outer,range.split.inner] Fix misuses of current_ (#3849)
This restores references to the 'current' placeholder.
1 parent 188de05 commit bcfa946

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

source/ranges.tex

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5590,17 +5590,17 @@
55905590
Equivalent to:
55915591
\begin{codeblock}
55925592
const auto end = ranges::end(@\exposid{parent_}@->@\exposid{base_}@);
5593-
if (@\exposid{current_}@ == end) return *this;
5593+
if (@\placeholder{current}@ == end) return *this;
55945594
const auto [pbegin, pend] = subrange{@\exposid{parent_}@->@\exposid{pattern_}@};
5595-
if (pbegin == pend) ++@\exposid{current_}@;
5595+
if (pbegin == pend) ++@\placeholder{current}@;
55965596
else {
55975597
do {
5598-
auto [b, p] = ranges::mismatch(std::move(@\exposid{current_}@), end, pbegin, pend);
5599-
@\exposid{current_}@ = std::move(b);
5598+
auto [b, p] = ranges::mismatch(std::move(@\placeholder{current}@), end, pbegin, pend);
5599+
@\placeholder{current}@ = std::move(b);
56005600
if (p == pend) {
56015601
break; // The pattern matched; skip it
56025602
}
5603-
} while (++@\exposid{current_}@ != end);
5603+
} while (++@\placeholder{current}@ != end);
56045604
}
56055605
return *this;
56065606
\end{codeblock}
@@ -5626,7 +5626,7 @@
56265626
\begin{itemdescr}
56275627
\pnum
56285628
\effects
5629-
Equivalent to: \tcode{return x.\exposid{current_} == ranges::end(x.\exposid{parent_}->\exposid{base_});}
5629+
Equivalent to: \tcode{return x.\placeholdernc{current} == ranges::end(x.\exposid{parent_}->\exposid{base_});}
56305630
\end{itemdescr}
56315631

56325632
\rSec3[range.split.outer.value]{Class \tcode{split_view::\exposid{outer-iterator}::value_type}}
@@ -5715,7 +5715,7 @@
57155715
@\exposid{inner-iterator}@() = default;
57165716
constexpr explicit @\exposid{inner-iterator}@(@\exposid{outer-iterator}@<Const> i);
57175717

5718-
constexpr decltype(auto) operator*() const { return *@\exposid{i_}@.@\exposid{current_}@; }
5718+
constexpr decltype(auto) operator*() const { return *@\exposid{i_}@.@\placeholder{current}@; }
57195719

57205720
constexpr @\exposid{inner-iterator}@& operator++();
57215721
constexpr decltype(auto) operator++(int) {

0 commit comments

Comments
 (0)