Skip to content

Commit 46f1be2

Browse files
Eelisfrederick-vs-ja
authored andcommitted
Use \range where appropriate.
1 parent 3de9b1c commit 46f1be2

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

Diff for: source/algorithms.tex

+3-3
Original file line numberDiff line numberDiff line change
@@ -7415,7 +7415,7 @@
74157415
are partitioned with respect to the expressions
74167416
\tcode{bool(invoke(comp, invoke(proj, e), value))} and
74177417
\tcode{!bool(invoke(comp, value, invoke(proj, e)))}.
7418-
Also, for all elements \tcode{e} of \tcode{[first, last)},
7418+
Also, for all elements \tcode{e} of \range{first}{last},
74197419
\tcode{bool(comp(e, value))} implies \tcode{!bool(comp(\brk{}value, e))}
74207420
for the overloads in namespace \tcode{std}.
74217421

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

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

1067410674
\pnum

Diff for: source/regex.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -3430,7 +3430,7 @@
34303430
In all cases in which the call to \tcode{regex_search} returns \tcode{true},
34313431
\tcode{match.prefix().first} shall be equal to the previous value of
34323432
\tcode{match[0].second}, and for each index \tcode{i} in the half-open range
3433-
\tcode{[0, match.size())} for which \tcode{match[i].matched} is \tcode{true},
3433+
\range{0}{match.size()} for which \tcode{match[i].matched} is \tcode{true},
34343434
\tcode{match.position(i)}
34353435
shall return \tcode{distance(begin, match[i].\brk{}first)}.
34363436

Diff for: source/strings.tex

+4-4
Original file line numberDiff line numberDiff line change
@@ -153,19 +153,19 @@
153153
the smallest \tcode{q} in \tcode{[p,p+n)} such that
154154
\tcode{X::eq(*q,c)} is \tcode{true}, \tcode{nullptr} otherwise. & linear \\ \rowsep
155155
\tcode{X::move(s,p,n)} & \tcode{X::char_type*} &
156-
for each \tcode{i} in \tcode{[0,n)}, performs \tcode{X::assign(s[i],p[i])}.
157-
Copies correctly even where the ranges \tcode{[p,p+n)} and \tcode{[s,s+n)} overlap.\br \returns \tcode{s}. & linear \\ \rowsep
156+
for each \tcode{i} in \range{0}{n}, performs \tcode{X::assign(s[i],p[i])}.
157+
Copies correctly even where the ranges \range{p}{p+n} and \range{s}{s+n} overlap.\br \returns \tcode{s}. & linear \\ \rowsep
158158
\tcode{X::copy(s,p,n)} & \tcode{X::char_type*} &
159159
\expects
160160
The ranges \range{p}{p+n} and \range{s}{s+n} do not overlap.\par
161161
\returns
162162
\tcode{s}.\br
163163
for each \tcode{i} in
164-
\tcode{[0,n)}, performs \tcode{X::assign(s[i],p[i])}. & linear \\ \rowsep
164+
\range{0}{n}, performs \tcode{X::assign(s[i],p[i])}. & linear \\ \rowsep
165165
\tcode{X::assign(r,d)} & (not used) &
166166
assigns \tcode{r=d}. & constant \\ \rowsep
167167
\tcode{X::assign\-(s,n,c)} & \tcode{X::char_type*} &
168-
for each \tcode{i} in \tcode{[0,n)}, performs
168+
for each \tcode{i} in \range{0}{n}, performs
169169
\tcode{X::assign(s[i],c)}.\br
170170
\returns
171171
\tcode{s}. & linear \\ \rowsep

0 commit comments

Comments
 (0)