Skip to content

Commit ba1f28d

Browse files
More uses of \range in [containers] and [strings]
1 parent 3039517 commit ba1f28d

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
@@ -1309,7 +1309,7 @@
13091309
denote iterators that meet the \oldconcept{InputIterator} requirements
13101310
and refer to elements implicitly convertible to \tcode{value_type},
13111311
\item
1312-
\tcode{[i, j)} denotes a valid range,
1312+
\range{i}{j} denotes a valid range,
13131313
\item
13141314
\tcode{rg} denotes a value of a type \tcode{R}
13151315
that models \tcode{\exposconcept{container-compatible-range}<T>},
@@ -1322,7 +1322,7 @@
13221322
\item
13231323
\tcode{q} denotes a valid dereferenceable constant iterator to \tcode{a},
13241324
\item
1325-
\tcode{[q1, q2)} denotes a valid range of constant iterators in \tcode{a},
1325+
\range{q1}{q2} denotes a valid range of constant iterators in \tcode{a},
13261326
\item
13271327
\tcode{t} denotes an lvalue or a const rvalue of \tcode{X::value_type}, and
13281328
\item
@@ -1384,7 +1384,7 @@
13841384

13851385
\pnum
13861386
\effects
1387-
Constructs a sequence container equal to the range \tcode{[i, j)}.
1387+
Constructs a sequence container equal to the range \range{i}{j}.
13881388
Each iterator in the range \range{i}{j} is dereferenced exactly once.
13891389

13901390
\pnum
@@ -1579,7 +1579,7 @@
15791579

15801580
\pnum
15811581
\effects
1582-
Inserts copies of elements in \tcode{[i, j)} before \tcode{p}.
1582+
Inserts copies of elements in \range{i}{j} before \tcode{p}.
15831583
Each iterator in the range \range{i}{j} shall be dereferenced exactly once.
15841584

15851585
\pnum
@@ -1676,7 +1676,7 @@
16761676

16771677
\pnum
16781678
\effects
1679-
Erases the elements in the range \tcode{[q1, q2)}.
1679+
Erases the elements in the range \range{q1}{q2}.
16801680

16811681
\pnum
16821682
\returns
@@ -1733,7 +1733,7 @@
17331733

17341734
\pnum
17351735
\effects
1736-
Replaces elements in \tcode{a} with a copy of \tcode{[i, j)}.
1736+
Replaces elements in \tcode{a} with a copy of \range{i}{j}.
17371737
Invalidates all references, pointers and iterators
17381738
referring to the elements of \tcode{a}.
17391739
For \tcode{vector} and \tcode{deque},
@@ -2691,7 +2691,7 @@
26912691
\item
26922692
\tcode{r} denotes a valid dereferenceable iterator to \tcode{a},
26932693
\item
2694-
\tcode{[q1, q2)} denotes a valid range of constant iterators in \tcode{a},
2694+
\range{q1}{q2} denotes a valid range of constant iterators in \tcode{a},
26952695
\item
26962696
\tcode{il} designates an object of type \tcode{initializer_list<value_type>},
26972697
\item
@@ -4180,7 +4180,7 @@
41804180
\tcode{i} and \tcode{j} denote input iterators
41814181
that refer to \tcode{value_type},
41824182
\item
4183-
\tcode{[i, j)} denotes a valid range,
4183+
\range{i}{j} denotes a valid range,
41844184
\item
41854185
\tcode{rg} denotes a value of a type \tcode{R}
41864186
that models \tcode{\exposconcept{container-compatible-range}<value_type>},
@@ -4192,7 +4192,7 @@
41924192
\item
41934193
\tcode{r} denotes a valid dereferenceable iterator to \tcode{a},
41944194
\item
4195-
\tcode{[q1, q2)} denotes a valid range in \tcode{a},
4195+
\range{q1}{q2} denotes a valid range in \tcode{a},
41964196
\item
41974197
\tcode{il} denotes a value of type \tcode{initializer_list<value_type>},
41984198
\item
@@ -5004,7 +5004,7 @@
50045004

50055005
\pnum
50065006
\effects
5007-
Equivalent to \tcode{a.insert(t)} for each element in \tcode{[i,j)}.
5007+
Equivalent to \tcode{a.insert(t)} for each element in \range{i}{j}.
50085008

50095009
\pnum
50105010
\complexity
@@ -5367,7 +5367,7 @@
53675367

53685368
\pnum
53695369
\effects
5370-
Erases all elements in the range \tcode{[q1, q2)}.
5370+
Erases all elements in the range \range{q1}{q2}.
53715371

53725372
\pnum
53735373
\returns
@@ -5603,7 +5603,7 @@
56035603
The index of the bucket
56045604
in which elements with keys equivalent to \tcode{k} would be found,
56055605
if any such element existed.
5606-
The return value is in the range \tcode{[0, b.bucket_count())}.
5606+
The return value is in the range \range{0}{b.bucket_count()}.
56075607

56085608
\pnum
56095609
\complexity
@@ -5626,7 +5626,7 @@
56265626

56275627
\pnum
56285628
\ensures
5629-
The return value is in the range \tcode{[0, a_tran.bucket_count())}.
5629+
The return value is in the range \range{0}{a_tran.bucket_count()}.
56305630

56315631
\pnum
56325632
\returns
@@ -5651,7 +5651,7 @@
56515651

56525652
\pnum
56535653
\expects
5654-
\tcode{n} shall be in the range \tcode{[0, b.bucket_count())}.
5654+
\tcode{n} shall be in the range \range{0}{b.bucket_count()}.
56555655

56565656
\pnum
56575657
\returns
@@ -5674,7 +5674,7 @@
56745674

56755675
\pnum
56765676
\expects
5677-
\tcode{n} is in the range \tcode{[0, b.bucket_count())}.
5677+
\tcode{n} is in the range \range{0}{b.bucket_count()}.
56785678

56795679
\pnum
56805680
\returns
@@ -5698,7 +5698,7 @@
56985698

56995699
\pnum
57005700
\expects
5701-
\tcode{n} is in the range \tcode{[0, b.bucket_count())}.
5701+
\tcode{n} is in the range \range{0}{b.bucket_count()}.
57025702

57035703
\pnum
57045704
\returns
@@ -5721,7 +5721,7 @@
57215721

57225722
\pnum
57235723
\expects
5724-
\tcode{n} shall be in the range \tcode{[0, b.bucket_count())}.
5724+
\tcode{n} shall be in the range \range{0}{b.bucket_count()}.
57255725

57265726
\pnum
57275727
\returns
@@ -5745,7 +5745,7 @@
57455745

57465746
\pnum
57475747
\expects
5748-
\tcode{n} is in the range \tcode{[0, b.bucket_count())}.
5748+
\tcode{n} is in the range \range{0}{b.bucket_count()}.
57495749

57505750
\pnum
57515751
\returns
@@ -8362,7 +8362,7 @@
83628362
\begin{itemdescr}
83638363
\pnum
83648364
\expects
8365-
\tcode{[first, last)} is a valid range in \tcode{x}.
8365+
\range{first}{last} is a valid range in \tcode{x}.
83668366
\tcode{position} is not an iterator in the range \range{first}{last}.
83678367

83688368
\pnum

source/strings.tex

+5-5
Original file line numberDiff line numberDiff line change
@@ -139,16 +139,16 @@
139139
whether \tcode{c} is to be treated as less than \tcode{d}. & constant \\ \rowsep
140140
\tcode{X::compare(p,q,n)} & \tcode{int} &
141141
\returns
142-
\tcode{0} if for each \tcode{i} in \tcode{[0,n)}, \tcode{X::eq(p[i],q[i])}
143-
is \tcode{true}; else, a negative value if, for some \tcode{j} in \tcode{[0,n)},
144-
\tcode{X::lt(p[j],q[j])} is \tcode{true} and for each \tcode{i} in \tcode{[0,j)}
142+
\tcode{0} if for each \tcode{i} in \range{0}{n}, \tcode{X::eq(p[i],q[i])}
143+
is \tcode{true}; else, a negative value if, for some \tcode{j} in \range{0}{n},
144+
\tcode{X::lt(p[j],q[j])} is \tcode{true} and for each \tcode{i} in \range{0}{j}
145145
\tcode{X::eq(p[i],q[i])} is \tcode{true}; else a positive value. & linear \\ \rowsep
146146
\tcode{X::length(p)} & \tcode{size_t} &
147147
\returns
148148
the smallest \tcode{i} such that \tcode{X::eq(p[i],charT())} is \tcode{true}. & linear \\ \rowsep
149149
\tcode{X::find(p,n,c)} & \tcode{const X::char_type*} &
150150
\returns
151-
the smallest \tcode{q} in \tcode{[p,p+n)} such that
151+
the smallest \tcode{q} in \range{p}{p+n} such that
152152
\tcode{X::eq(*q,c)} is \tcode{true}, \tcode{nullptr} otherwise. & linear \\ \rowsep
153153
\tcode{X::move(s,p,n)} & \tcode{X::char_type*} &
154154
for each \tcode{i} in \range{0}{n}, performs \tcode{X::assign(s[i],p[i])}.
@@ -3916,7 +3916,7 @@
39163916
\pnum
39173917
\effects
39183918
Removes the characters in the range
3919-
\tcode{[first, last)}.
3919+
\range{first}{last}.
39203920

39213921
\pnum
39223922
\returns

0 commit comments

Comments
 (0)