Skip to content

Commit

Permalink
More uses of \range in [containers] and [strings]
Browse files Browse the repository at this point in the history
  • Loading branch information
frederick-vs-ja committed Jul 21, 2024
1 parent 46f1be2 commit 1e29413
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
38 changes: 19 additions & 19 deletions source/containers.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1301,7 +1301,7 @@
denote iterators that meet the \oldconcept{InputIterator} requirements
and refer to elements implicitly convertible to \tcode{value_type},
\item
\tcode{[i, j)} denotes a valid range,
\range{i}{j} denotes a valid range,
\item
\tcode{rg} denotes a value of a type \tcode{R}
that models \tcode{\exposconcept{container-compatible-range}<T>},
Expand All @@ -1314,7 +1314,7 @@
\item
\tcode{q} denotes a valid dereferenceable constant iterator to \tcode{a},
\item
\tcode{[q1, q2)} denotes a valid range of constant iterators in \tcode{a},
\range{q1}{q2} denotes a valid range of constant iterators in \tcode{a},
\item
\tcode{t} denotes an lvalue or a const rvalue of \tcode{X::value_type}, and
\item
Expand Down Expand Up @@ -1376,7 +1376,7 @@

\pnum
\effects
Constructs a sequence container equal to the range \tcode{[i, j)}.
Constructs a sequence container equal to the range \range{i}{j}.
Each iterator in the range \range{i}{j} is dereferenced exactly once.

\pnum
Expand Down Expand Up @@ -1571,7 +1571,7 @@

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

\pnum
Expand Down Expand Up @@ -1668,7 +1668,7 @@

\pnum
\effects
Erases the elements in the range \tcode{[q1, q2)}.
Erases the elements in the range \range{q1}{q2}.

\pnum
\returns
Expand Down Expand Up @@ -1725,7 +1725,7 @@

\pnum
\effects
Replaces elements in \tcode{a} with a copy of \tcode{[i, j)}.
Replaces elements in \tcode{a} with a copy of \range{i}{j}.
Invalidates all references, pointers and iterators
referring to the elements of \tcode{a}.
For \tcode{vector} and \tcode{deque},
Expand Down Expand Up @@ -2683,7 +2683,7 @@
\item
\tcode{r} denotes a valid dereferenceable iterator to \tcode{a},
\item
\tcode{[q1, q2)} denotes a valid range of constant iterators in \tcode{a},
\range{q1}{q2} denotes a valid range of constant iterators in \tcode{a},
\item
\tcode{il} designates an object of type \tcode{initializer_list<value_type>},
\item
Expand Down Expand Up @@ -4168,7 +4168,7 @@
\tcode{i} and \tcode{j} denote input iterators
that refer to \tcode{value_type},
\item
\tcode{[i, j)} denotes a valid range,
\range{i}{j} denotes a valid range,
\item
\tcode{rg} denotes a value of a type \tcode{R}
that models \tcode{\exposconcept{container-compatible-range}<value_type>},
Expand All @@ -4180,7 +4180,7 @@
\item
\tcode{r} denotes a valid dereferenceable iterator to \tcode{a},
\item
\tcode{[q1, q2)} denotes a valid range in \tcode{a},
\range{q1}{q2} denotes a valid range in \tcode{a},
\item
\tcode{il} denotes a value of type \tcode{initializer_list<value_type>},
\item
Expand Down Expand Up @@ -4992,7 +4992,7 @@

\pnum
\effects
Equivalent to \tcode{a.insert(t)} for each element in \tcode{[i,j)}.
Equivalent to \tcode{a.insert(t)} for each element in \range{i}{j}.

\pnum
\complexity
Expand Down Expand Up @@ -5355,7 +5355,7 @@

\pnum
\effects
Erases all elements in the range \tcode{[q1, q2)}.
Erases all elements in the range \range{q1}{q2}.

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

\pnum
\complexity
Expand All @@ -5614,7 +5614,7 @@

\pnum
\ensures
The return value is in the range \tcode{[0, a_tran.bucket_count())}.
The return value is in the range \range{0}{a_tran.bucket_count()}.

\pnum
\returns
Expand All @@ -5639,7 +5639,7 @@

\pnum
\expects
\tcode{n} shall be in the range \tcode{[0, b.bucket_count())}.
\tcode{n} shall be in the range \range{0}{b.bucket_count()}.

\pnum
\returns
Expand All @@ -5662,7 +5662,7 @@

\pnum
\expects
\tcode{n} is in the range \tcode{[0, b.bucket_count())}.
\tcode{n} is in the range \range{0}{b.bucket_count()}.

\pnum
\returns
Expand All @@ -5686,7 +5686,7 @@

\pnum
\expects
\tcode{n} is in the range \tcode{[0, b.bucket_count())}.
\tcode{n} is in the range \range{0}{b.bucket_count()}.

\pnum
\returns
Expand All @@ -5709,7 +5709,7 @@

\pnum
\expects
\tcode{n} shall be in the range \tcode{[0, b.bucket_count())}.
\tcode{n} shall be in the range \range{0}{b.bucket_count()}.

\pnum
\returns
Expand All @@ -5733,7 +5733,7 @@

\pnum
\expects
\tcode{n} is in the range \tcode{[0, b.bucket_count())}.
\tcode{n} is in the range \range{0}{b.bucket_count()}.

\pnum
\returns
Expand Down Expand Up @@ -8425,7 +8425,7 @@
\begin{itemdescr}
\pnum
\expects
\tcode{[first, last)} is a valid range in \tcode{x}.
\range{first}{last} is a valid range in \tcode{x}.
\tcode{position} is not an iterator in the range \range{first}{last}.

\pnum
Expand Down
10 changes: 5 additions & 5 deletions source/strings.tex
Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,16 @@
whether \tcode{c} is to be treated as less than \tcode{d}. & constant \\ \rowsep
\tcode{X::compare(p,q,n)} & \tcode{int} &
\returns
\tcode{0} if for each \tcode{i} in \tcode{[0,n)}, \tcode{X::eq(p[i],q[i])}
is \tcode{true}; else, a negative value if, for some \tcode{j} in \tcode{[0,n)},
\tcode{X::lt(p[j],q[j])} is \tcode{true} and for each \tcode{i} in \tcode{[0,j)}
\tcode{0} if for each \tcode{i} in \range{0}{n}, \tcode{X::eq(p[i],q[i])}
is \tcode{true}; else, a negative value if, for some \tcode{j} in \range{0}{n},
\tcode{X::lt(p[j],q[j])} is \tcode{true} and for each \tcode{i} in \range{0}{j}
\tcode{X::eq(p[i],q[i])} is \tcode{true}; else a positive value. & linear \\ \rowsep
\tcode{X::length(p)} & \tcode{size_t} &
\returns
the smallest \tcode{i} such that \tcode{X::eq(p[i],charT())} is \tcode{true}. & linear \\ \rowsep
\tcode{X::find(p,n,c)} & \tcode{const X::char_type*} &
\returns
the smallest \tcode{q} in \tcode{[p,p+n)} such that
the smallest \tcode{q} in \range{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 \range{0}{n}, performs \tcode{X::assign(s[i],p[i])}.
Expand Down Expand Up @@ -3918,7 +3918,7 @@
\pnum
\effects
Removes the characters in the range
\tcode{[first, last)}.
\range{first}{last}.

\pnum
\returns
Expand Down

0 comments on commit 1e29413

Please sign in to comment.