Skip to content

Commit 1e29413

Browse files
committedJul 21, 2024
More uses of \range in [containers] and [strings]
1 parent 46f1be2 commit 1e29413

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed
 

‎source/containers.tex

+19-19
Original file line numberDiff line numberDiff line change
@@ -1301,7 +1301,7 @@
13011301
denote iterators that meet the \oldconcept{InputIterator} requirements
13021302
and refer to elements implicitly convertible to \tcode{value_type},
13031303
\item
1304-
\tcode{[i, j)} denotes a valid range,
1304+
\range{i}{j} denotes a valid range,
13051305
\item
13061306
\tcode{rg} denotes a value of a type \tcode{R}
13071307
that models \tcode{\exposconcept{container-compatible-range}<T>},
@@ -1314,7 +1314,7 @@
13141314
\item
13151315
\tcode{q} denotes a valid dereferenceable constant iterator to \tcode{a},
13161316
\item
1317-
\tcode{[q1, q2)} denotes a valid range of constant iterators in \tcode{a},
1317+
\range{q1}{q2} denotes a valid range of constant iterators in \tcode{a},
13181318
\item
13191319
\tcode{t} denotes an lvalue or a const rvalue of \tcode{X::value_type}, and
13201320
\item
@@ -1376,7 +1376,7 @@
13761376

13771377
\pnum
13781378
\effects
1379-
Constructs a sequence container equal to the range \tcode{[i, j)}.
1379+
Constructs a sequence container equal to the range \range{i}{j}.
13801380
Each iterator in the range \range{i}{j} is dereferenced exactly once.
13811381

13821382
\pnum
@@ -1571,7 +1571,7 @@
15711571

15721572
\pnum
15731573
\effects
1574-
Inserts copies of elements in \tcode{[i, j)} before \tcode{p}.
1574+
Inserts copies of elements in \range{i}{j} before \tcode{p}.
15751575
Each iterator in the range \range{i}{j} shall be dereferenced exactly once.
15761576

15771577
\pnum
@@ -1668,7 +1668,7 @@
16681668

16691669
\pnum
16701670
\effects
1671-
Erases the elements in the range \tcode{[q1, q2)}.
1671+
Erases the elements in the range \range{q1}{q2}.
16721672

16731673
\pnum
16741674
\returns
@@ -1725,7 +1725,7 @@
17251725

17261726
\pnum
17271727
\effects
1728-
Replaces elements in \tcode{a} with a copy of \tcode{[i, j)}.
1728+
Replaces elements in \tcode{a} with a copy of \range{i}{j}.
17291729
Invalidates all references, pointers and iterators
17301730
referring to the elements of \tcode{a}.
17311731
For \tcode{vector} and \tcode{deque},
@@ -2683,7 +2683,7 @@
26832683
\item
26842684
\tcode{r} denotes a valid dereferenceable iterator to \tcode{a},
26852685
\item
2686-
\tcode{[q1, q2)} denotes a valid range of constant iterators in \tcode{a},
2686+
\range{q1}{q2} denotes a valid range of constant iterators in \tcode{a},
26872687
\item
26882688
\tcode{il} designates an object of type \tcode{initializer_list<value_type>},
26892689
\item
@@ -4168,7 +4168,7 @@
41684168
\tcode{i} and \tcode{j} denote input iterators
41694169
that refer to \tcode{value_type},
41704170
\item
4171-
\tcode{[i, j)} denotes a valid range,
4171+
\range{i}{j} denotes a valid range,
41724172
\item
41734173
\tcode{rg} denotes a value of a type \tcode{R}
41744174
that models \tcode{\exposconcept{container-compatible-range}<value_type>},
@@ -4180,7 +4180,7 @@
41804180
\item
41814181
\tcode{r} denotes a valid dereferenceable iterator to \tcode{a},
41824182
\item
4183-
\tcode{[q1, q2)} denotes a valid range in \tcode{a},
4183+
\range{q1}{q2} denotes a valid range in \tcode{a},
41844184
\item
41854185
\tcode{il} denotes a value of type \tcode{initializer_list<value_type>},
41864186
\item
@@ -4992,7 +4992,7 @@
49924992

49934993
\pnum
49944994
\effects
4995-
Equivalent to \tcode{a.insert(t)} for each element in \tcode{[i,j)}.
4995+
Equivalent to \tcode{a.insert(t)} for each element in \range{i}{j}.
49964996

49974997
\pnum
49984998
\complexity
@@ -5355,7 +5355,7 @@
53555355

53565356
\pnum
53575357
\effects
5358-
Erases all elements in the range \tcode{[q1, q2)}.
5358+
Erases all elements in the range \range{q1}{q2}.
53595359

53605360
\pnum
53615361
\returns
@@ -5591,7 +5591,7 @@
55915591
The index of the bucket
55925592
in which elements with keys equivalent to \tcode{k} would be found,
55935593
if any such element existed.
5594-
The return value is in the range \tcode{[0, b.bucket_count())}.
5594+
The return value is in the range \range{0}{b.bucket_count()}.
55955595

55965596
\pnum
55975597
\complexity
@@ -5614,7 +5614,7 @@
56145614

56155615
\pnum
56165616
\ensures
5617-
The return value is in the range \tcode{[0, a_tran.bucket_count())}.
5617+
The return value is in the range \range{0}{a_tran.bucket_count()}.
56185618

56195619
\pnum
56205620
\returns
@@ -5639,7 +5639,7 @@
56395639

56405640
\pnum
56415641
\expects
5642-
\tcode{n} shall be in the range \tcode{[0, b.bucket_count())}.
5642+
\tcode{n} shall be in the range \range{0}{b.bucket_count()}.
56435643

56445644
\pnum
56455645
\returns
@@ -5662,7 +5662,7 @@
56625662

56635663
\pnum
56645664
\expects
5665-
\tcode{n} is in the range \tcode{[0, b.bucket_count())}.
5665+
\tcode{n} is in the range \range{0}{b.bucket_count()}.
56665666

56675667
\pnum
56685668
\returns
@@ -5686,7 +5686,7 @@
56865686

56875687
\pnum
56885688
\expects
5689-
\tcode{n} is in the range \tcode{[0, b.bucket_count())}.
5689+
\tcode{n} is in the range \range{0}{b.bucket_count()}.
56905690

56915691
\pnum
56925692
\returns
@@ -5709,7 +5709,7 @@
57095709

57105710
\pnum
57115711
\expects
5712-
\tcode{n} shall be in the range \tcode{[0, b.bucket_count())}.
5712+
\tcode{n} shall be in the range \range{0}{b.bucket_count()}.
57135713

57145714
\pnum
57155715
\returns
@@ -5733,7 +5733,7 @@
57335733

57345734
\pnum
57355735
\expects
5736-
\tcode{n} is in the range \tcode{[0, b.bucket_count())}.
5736+
\tcode{n} is in the range \range{0}{b.bucket_count()}.
57375737

57385738
\pnum
57395739
\returns
@@ -8425,7 +8425,7 @@
84258425
\begin{itemdescr}
84268426
\pnum
84278427
\expects
8428-
\tcode{[first, last)} is a valid range in \tcode{x}.
8428+
\range{first}{last} is a valid range in \tcode{x}.
84298429
\tcode{position} is not an iterator in the range \range{first}{last}.
84308430

84318431
\pnum

‎source/strings.tex

+5-5
Original file line numberDiff line numberDiff line change
@@ -141,16 +141,16 @@
141141
whether \tcode{c} is to be treated as less than \tcode{d}. & constant \\ \rowsep
142142
\tcode{X::compare(p,q,n)} & \tcode{int} &
143143
\returns
144-
\tcode{0} if for each \tcode{i} in \tcode{[0,n)}, \tcode{X::eq(p[i],q[i])}
145-
is \tcode{true}; else, a negative value if, for some \tcode{j} in \tcode{[0,n)},
146-
\tcode{X::lt(p[j],q[j])} is \tcode{true} and for each \tcode{i} in \tcode{[0,j)}
144+
\tcode{0} if for each \tcode{i} in \range{0}{n}, \tcode{X::eq(p[i],q[i])}
145+
is \tcode{true}; else, a negative value if, for some \tcode{j} in \range{0}{n},
146+
\tcode{X::lt(p[j],q[j])} is \tcode{true} and for each \tcode{i} in \range{0}{j}
147147
\tcode{X::eq(p[i],q[i])} is \tcode{true}; else a positive value. & linear \\ \rowsep
148148
\tcode{X::length(p)} & \tcode{size_t} &
149149
\returns
150150
the smallest \tcode{i} such that \tcode{X::eq(p[i],charT())} is \tcode{true}. & linear \\ \rowsep
151151
\tcode{X::find(p,n,c)} & \tcode{const X::char_type*} &
152152
\returns
153-
the smallest \tcode{q} in \tcode{[p,p+n)} such that
153+
the smallest \tcode{q} in \range{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*} &
156156
for each \tcode{i} in \range{0}{n}, performs \tcode{X::assign(s[i],p[i])}.
@@ -3918,7 +3918,7 @@
39183918
\pnum
39193919
\effects
39203920
Removes the characters in the range
3921-
\tcode{[first, last)}.
3921+
\range{first}{last}.
39223922

39233923
\pnum
39243924
\returns

0 commit comments

Comments
 (0)