Skip to content

Harmonize the phrasing of "X models foo_of<Y>" #7036

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions source/algorithms.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4292,9 +4292,8 @@
and \tcode{last1 - first1 != last2 - first2}
for the overloads in namespace \tcode{std};
\item
the types of \tcode{first1}, \tcode{last1}, \tcode{first2}, and \tcode{last2}
pairwise model \libconcept{sized_sentinel_for}\iref{iterator.concept.sizedsentinel}
and \tcode{last1 - first1 != last2 - first2}
\tcode{S1} models \tcode{\libconcept{sized_sentinel_for}<I1>}, \tcode{S2} models \tcode{\libconcept{sized_sentinel_for}<I2>},
and \tcode{last1 - first1 != last2 - first2}
for the first overload in namespace \tcode{ranges},
\item
\tcode{R1} and \tcode{R2} each model \libconcept{sized_range} and
Expand Down Expand Up @@ -4408,8 +4407,8 @@
\item
for the first overload,
\begin{itemize}
\item \tcode{S1} and \tcode{I1} model \tcode{\libconcept{sized_sentinel_for}<S1, I1>},
\item \tcode{S2} and \tcode{I2} model \tcode{\libconcept{sized_sentinel_for}<S2, I2>}, and
\item \tcode{S1} models \tcode{\libconcept{sized_sentinel_for}<I1>},
\item \tcode{S2} models \tcode{\libconcept{sized_sentinel_for}<I2>}, and
\item \tcode{last1 - first1 != last2 - first2};
\end{itemize}
\item
Expand Down
23 changes: 11 additions & 12 deletions source/iterators.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1418,13 +1418,13 @@

\pnum
A type \tcode{I} other than \cv{}~\tcode{bool} is \defn{integer-like}
if it models \tcode{\libconcept{integral}<I>} or
if it models \libconcept{integral} or
if it is an integer-class type.
An integer-like type \tcode{I} is \defn{signed-integer-like}
if it models \tcode{\libconcept{signed_integral}<I>} or
if it models \libconcept{signed_integral} or
if it is a signed-integer-class type.
An integer-like type \tcode{I} is \defn{unsigned-integer-like}
if it models \tcode{\libconcept{unsigned_integral}<I>} or
if it models \libconcept{unsigned_integral} or
if it is an unsigned-integer-class type.

\pnum
Expand Down Expand Up @@ -1544,7 +1544,7 @@
\pnum
Let \tcode{i} be an object of type \tcode{I}. When \tcode{i} is in the domain of
both pre- and post-increment, \tcode{i} is said to be \defn{incrementable}.
\tcode{I} models \tcode{\libconcept{weakly_incrementable}<I>} only if
\tcode{I} models \libconcept{weakly_incrementable} only if
\begin{itemize}
\item The expressions \tcode{++i} and \tcode{i++} have the same domain.
\item If \tcode{i} is incrementable, then both \tcode{++i}
Expand Down Expand Up @@ -1654,7 +1654,7 @@
\pnum
Let \tcode{s} and \tcode{i} be values of type \tcode{S} and
\tcode{I} such that \range{i}{s} denotes a range. Types
\tcode{S} and \tcode{I} model \tcode{\libconcept{sentinel_for}<S, I>} only if
\tcode{S} models \tcode{\libconcept{sentinel_for}<I>} only if
\begin{itemize}
\item \tcode{i == s} is well-defined.

Expand Down Expand Up @@ -1699,7 +1699,7 @@
a sentinel of type \tcode{S} such that \range{i}{s} denotes a range.
Let $N$ be the smallest number of applications of \tcode{++i}
necessary to make \tcode{bool(i == s)} be \tcode{true}.
\tcode{S} and \tcode{I} model \tcode{\libconcept{sized_sentinel_for}<S, I>} only if
\tcode{S} models \tcode{\libconcept{sized_sentinel_for}<I>} only if
\begin{itemize}
\item If $N$ is representable by \tcode{iter_difference_t<I>},
then \tcode{s - i} is well-defined and equals $N$.
Expand Down Expand Up @@ -3004,9 +3004,9 @@
\pnum
\effects
\begin{itemize}
\item If \tcode{I} and \tcode{S} model \tcode{\libconcept{assignable_from}<I\&, S>},
\item If \tcode{I&} models \tcode{\libconcept{assignable_from}<S>},
equivalent to \tcode{i = std::move(bound)}.
\item Otherwise, if \tcode{S} and \tcode{I} model \tcode{\libconcept{sized_sentinel_for}<S, I>},
\item Otherwise, if \tcode{S} models \tcode{\libconcept{sized_sentinel_for}<I>},
equivalent to \tcode{ranges::advance(i, bound - i)}.
\item Otherwise, while \tcode{bool(i != bound)} is \tcode{true},
increments \tcode{i}.
Expand All @@ -3026,12 +3026,12 @@
If \tcode{n == 0}, \range{i}{bound} or \range{bound}{i} denotes a range.
If \tcode{n < 0}, \range{bound}{i} denotes a range,
\tcode{I} models \libconcept{bidirectional_iterator}, and
\tcode{I} and \tcode{S} model \tcode{\libconcept{same_as}<I, S>}.
\tcode{S} models \tcode{\libconcept{same_as}<I>}.

\pnum
\effects
\begin{itemize}
\item If \tcode{S} and \tcode{I} model \tcode{\libconcept{sized_sentinel_for}<S, I>}:
\item If \tcode{S} models \tcode{\libconcept{sized_sentinel_for}<I>}:
\begin{itemize}
\item If \brk{}$|\tcode{n}| \ge |\tcode{bound - i}|$,
equivalent to \tcode{ranges::advance(i, bound)}.
Expand Down Expand Up @@ -5316,8 +5316,7 @@
Class template \tcode{move_sentinel} is a sentinel adaptor useful for denoting
ranges together with \tcode{move_iterator}. When an input iterator type
\tcode{I} and sentinel type \tcode{S} model \tcode{\libconcept{sentinel_for}<S, I>},
\tcode{move_sentinel<S>} and \tcode{move_iterator<I>} model
\tcode{\libconcept{sentinel_for}<move_sentinel<S>, move_iterator<I>>} as well.
\tcode{\libconcept{sentinel_for}<move_sentinel<S>, move_iterator<I>>} is modeled as well.

\pnum
\begin{example}
Expand Down
34 changes: 13 additions & 21 deletions source/ranges.tex
Original file line number Diff line number Diff line change
Expand Up @@ -743,10 +743,8 @@

\pnum
\begin{note}
Whenever \tcode{ranges::end(E)} is a valid expression,
the types \tcode{S} and \tcode{I} of
\tcode{ranges::end(E)} and \tcode{ranges::begin(E)}
model \tcode{\libconcept{sentinel_for}<S, I>}.
Whenever \tcode{ranges::end(E)} is a valid expression, its type models
\tcode{\libconcept{sentinel_for}<decltype(ranges::begin(E))>}.
\end{note}

\rSec2[range.access.cbegin]{\tcode{ranges::cbegin}}
Expand Down Expand Up @@ -799,12 +797,10 @@

\pnum
\begin{note}
Whenever \tcode{ranges::cend(E)} is a valid expression,
the types \tcode{S} and \tcode{I} of the expressions
\tcode{ranges::cend(E)} and \tcode{ranges::cbegin(E)}
model \tcode{\libconcept{sentinel_for}<S, I>}.
If \tcode{S} models \libconcept{input_iterator},
then \tcode{S} also models \exposconceptx{constant-itera\-tor}{constant-iterator}.
Whenever \tcode{ranges::cend(E)} is a valid expression, its type models
\tcode{\libconcept{sentinel_for}<decltype(ranges::cbegin(E))>}.
If the type of \tcode{ranges::cend(E)} models \libconcept{input_iterator},
then it also models \exposconcept{constant-iterator}.
\end{note}

\rSec2[range.access.rbegin]{\tcode{ranges::rbegin}}
Expand Down Expand Up @@ -897,7 +893,7 @@
\item
Otherwise, if \tcode{auto(t.rend())}
is a valid expression whose type models
\tcode{\libconcept{sentinel_for}<decltype(\brk{}ranges::rbegin(E))>}
\tcode{\libconcept{sentinel_for}<decltype(\brk{}ranges::rbegin(E))>},
then \tcode{ranges::rend(E)} is expression-equivalent to
\tcode{auto(t.rend())}.

Expand Down Expand Up @@ -931,10 +927,8 @@

\pnum
\begin{note}
Whenever \tcode{ranges::rend(E)} is a valid expression,
the types \tcode{S} and \tcode{I} of the expressions
\tcode{ranges::rend(E)} and \tcode{ranges::rbegin(E)}
model \tcode{\libconcept{sentinel_for}<S, I>}.
Whenever \tcode{ranges::rend(E)} is a valid expression, its type models
\tcode{\libconcept{sentinel_for}<decltype(ranges::rbegin(E))>}.
\end{note}

\rSec2[range.access.crbegin]{\tcode{ranges::crbegin}}
Expand Down Expand Up @@ -988,12 +982,10 @@

\pnum
\begin{note}
Whenever \tcode{ranges::crend(E)} is a valid expression,
the types \tcode{S} and \tcode{I} of the expressions
\tcode{ranges::crend(E)} and \tcode{ranges::crbegin(E)}
model \tcode{\libconcept{sentinel_for}<S, I>}.
If \tcode{S} models \libconcept{input_iterator},
then \tcode{S} also models \exposconceptx{constant-itera\-tor}{constant-iterator}.
Whenever \tcode{ranges::crend(E)} is a valid expression, its type models
\tcode{\libconcept{sentinel_for}<decltype(ranges::crbegin(E))>}.
If the type of \tcode{ranges::crend(E)} models \libconcept{input_iterator},
then it also models \exposconcept{constant-iterator}.
\end{note}

\rSec2[range.prim.size]{\tcode{ranges::size}}
Expand Down
Loading