Skip to content

Commit 95746ab

Browse files
jensmaurerJohelEGP
andauthored
Apply suggestions from code review
Co-authored-by: Johel Ernesto Guerrero Peña <[email protected]>
1 parent 864f00a commit 95746ab

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

source/ranges.tex

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10055,7 +10055,7 @@
1005510055

1005610056
\pnum
1005710057
\tcode{chunk_by_view} takes a \libconcept{view} and a predicate, and
10058-
splits the \libconcept{view} into subranges
10058+
splits the \libconcept{view} into \tcode{subrange}s
1005910059
between each pair of adjacent elements
1006010060
for which the predicate returns \tcode{false}.
1006110061

@@ -10079,8 +10079,8 @@
1007910079
}
1008010080
cout << "] ";
1008110081
}
10082-
// The above prints: [1, 2, 2, 3] [0, 4, 5] [2]
1008310082
\end{codeblock}
10083+
The above prints: \tcode{[1, 2, 2, 3] [0, 4, 5] [2]}
1008410084
\end{example}
1008510085

1008610086
\rSec3[range.chunk.by.view]{Class template \tcode{chunk_by_view}}
@@ -10089,7 +10089,7 @@
1008910089
namespace std::ranges {
1009010090
template<@\libconcept{forward_range}@ V, @\libconcept{indirect_binary_predicate}@<iterator_t<V>, iterator_t<V>> Pred>
1009110091
requires @\libconcept{view}@<V> && is_object_v<Pred>
10092-
class chunk_by_view : public view_interface<chunk_by_view<V, Pred>>{
10092+
class chunk_by_view : public view_interface<chunk_by_view<V, Pred>> {
1009310093
V @\exposid{base_}@ = V(); // \expos
1009410094
@\exposid{copyable-box}@<Pred> @\exposid{pred_}@ = Pred(); // \expos
1009510095

@@ -10126,9 +10126,10 @@
1012610126
\pnum
1012710127
\effects
1012810128
Initializes \exposid{base_} with \tcode{std::move(base)} and
10129-
@\exposid{pred_}@ with \tcode{std::move(pred)}.
10129+
\exposid{pred_} with \tcode{std::move(pred)}.
1013010130
\end{itemdescr}
1013110131

10132+
\indexlibrarymember{pred}{chunk_by_view}%
1013210133
\begin{itemdecl}
1013310134
constexpr const Pred& pred() const;
1013410135
\end{itemdecl}
@@ -10140,7 +10141,7 @@
1014010141
\end{itemdescr}
1014110142

1014210143
\begin{itemdecl}
10143-
constexpr iterator begin();
10144+
constexpr @\exposid{iterator}@ begin();
1014410145
\end{itemdecl}
1014510146

1014610147
\begin{itemdescr}
@@ -10155,7 +10156,7 @@
1015510156
\pnum
1015610157
\remarks
1015710158
In order to provide
10158-
the amortized constant-time complexity required by the range concept,
10159+
the amortized constant-time complexity required by the \libconcept{range} concept,
1015910160
this function caches the result within the \tcode{chunk_by_view}
1016010161
for use on subsequent calls.
1016110162
\end{itemdescr}
@@ -10209,11 +10210,11 @@
1020910210

1021010211
\pnum
1021110212
\returns
10212-
An \exposid{iterator} \tcode{i}
10213+
An iterator \tcode{i}
1021310214
in the range \range{ranges::begin(\exposid{base_})}{current} such that:
1021410215
\begin{itemize}
1021510216
\item
10216-
\tcode{ranges::adjacent_find(i, current, not_fn(ref(*\exposid{pred_})))} is equal to \exposid{current}; and
10217+
\tcode{ranges::adjacent_find(i, current, not_fn(ref(*\exposid{pred_})))} is equal to \tcode{current}; and
1021710218
\item
1021810219
if \tcode{i} is not equal to \tcode{ranges::begin(\exposid{base_})},
1021910220
then \tcode{bool(invoke(*\exposid{pred_}, *ranges::prev(i), *i))}

0 commit comments

Comments
 (0)