Skip to content

Commit

Permalink
Use \range where appropriate.
Browse files Browse the repository at this point in the history
  • Loading branch information
Eelis authored and frederick-vs-ja committed Jul 21, 2024
1 parent 3de9b1c commit 46f1be2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions source/algorithms.tex
Original file line number Diff line number Diff line change
Expand Up @@ -7415,7 +7415,7 @@
are partitioned with respect to the expressions
\tcode{bool(invoke(comp, invoke(proj, e), value))} and
\tcode{!bool(invoke(comp, value, invoke(proj, e)))}.
Also, for all elements \tcode{e} of \tcode{[first, last)},
Also, for all elements \tcode{e} of \range{first}{last},
\tcode{bool(comp(e, value))} implies \tcode{!bool(comp(\brk{}value, e))}
for the overloads in namespace \tcode{std}.

Expand Down Expand Up @@ -7482,7 +7482,7 @@
are partitioned with respect to the expressions
\tcode{bool(invoke(comp, invoke(proj, e), value))} and
\tcode{!bool(invoke(comp, value, invoke(proj, e)))}.
Also, for all elements \tcode{e} of \tcode{[first, last)},
Also, for all elements \tcode{e} of \range{first}{last},
\tcode{bool(comp(e, value))} implies \tcode{!bool(comp(\brk{}value, e))}
for the overloads in namespace \tcode{std}.

Expand Down Expand Up @@ -10668,7 +10668,7 @@
\pnum
For the overloads with an \tcode{ExecutionPolicy} and a non-empty range,
performs \tcode{*result = *first}.
Then, for every \tcode{d} in \tcode{[1, last - first - 1]},
Then, for every \tcode{d} in \crange{1}{last - first - 1},
performs \tcode{*(result + d) = binary_op(*(first + d), *(first + (d - 1)))}.

\pnum
Expand Down
2 changes: 1 addition & 1 deletion source/regex.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3430,7 +3430,7 @@
In all cases in which the call to \tcode{regex_search} returns \tcode{true},
\tcode{match.prefix().first} shall be equal to the previous value of
\tcode{match[0].second}, and for each index \tcode{i} in the half-open range
\tcode{[0, match.size())} for which \tcode{match[i].matched} is \tcode{true},
\range{0}{match.size()} for which \tcode{match[i].matched} is \tcode{true},
\tcode{match.position(i)}
shall return \tcode{distance(begin, match[i].\brk{}first)}.

Expand Down
8 changes: 4 additions & 4 deletions source/strings.tex
Original file line number Diff line number Diff line change
Expand Up @@ -153,19 +153,19 @@
the smallest \tcode{q} in \tcode{[p,p+n)} such that
\tcode{X::eq(*q,c)} is \tcode{true}, \tcode{nullptr} otherwise. & linear \\ \rowsep
\tcode{X::move(s,p,n)} & \tcode{X::char_type*} &
for each \tcode{i} in \tcode{[0,n)}, performs \tcode{X::assign(s[i],p[i])}.
Copies correctly even where the ranges \tcode{[p,p+n)} and \tcode{[s,s+n)} overlap.\br \returns \tcode{s}. & linear \\ \rowsep
for each \tcode{i} in \range{0}{n}, performs \tcode{X::assign(s[i],p[i])}.
Copies correctly even where the ranges \range{p}{p+n} and \range{s}{s+n} overlap.\br \returns \tcode{s}. & linear \\ \rowsep
\tcode{X::copy(s,p,n)} & \tcode{X::char_type*} &
\expects
The ranges \range{p}{p+n} and \range{s}{s+n} do not overlap.\par
\returns
\tcode{s}.\br
for each \tcode{i} in
\tcode{[0,n)}, performs \tcode{X::assign(s[i],p[i])}. & linear \\ \rowsep
\range{0}{n}, performs \tcode{X::assign(s[i],p[i])}. & linear \\ \rowsep
\tcode{X::assign(r,d)} & (not used) &
assigns \tcode{r=d}. & constant \\ \rowsep
\tcode{X::assign\-(s,n,c)} & \tcode{X::char_type*} &
for each \tcode{i} in \tcode{[0,n)}, performs
for each \tcode{i} in \range{0}{n}, performs
\tcode{X::assign(s[i],c)}.\br
\returns
\tcode{s}. & linear \\ \rowsep
Expand Down

0 comments on commit 46f1be2

Please sign in to comment.