Skip to content

Commit d511a0a

Browse files
committed
Harmonize the phrasing of "X models foo_of<Y>"
This leaves at least two places that I don't know quite how to reword without major surgery; but it makes everything else consistent.
1 parent 1cb3842 commit d511a0a

File tree

3 files changed

+28
-38
lines changed

3 files changed

+28
-38
lines changed

source/algorithms.tex

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4292,9 +4292,8 @@
42924292
and \tcode{last1 - first1 != last2 - first2}
42934293
for the overloads in namespace \tcode{std};
42944294
\item
4295-
the types of \tcode{first1}, \tcode{last1}, \tcode{first2}, and \tcode{last2}
4296-
pairwise model \libconcept{sized_sentinel_for}\iref{iterator.concept.sizedsentinel}
4297-
and \tcode{last1 - first1 != last2 - first2}
4295+
\tcode{S1} models \tcode{\libconcept{sized_sentinel_for}<I1>}, \tcode{S2} models \tcode{\libconcept{sized_sentinel_for}<I2>},
4296+
and \tcode{last1 - first1 != last2 - first2}
42984297
for the first overload in namespace \tcode{ranges},
42994298
\item
43004299
\tcode{R1} and \tcode{R2} each model \libconcept{sized_range} and
@@ -4408,8 +4407,8 @@
44084407
\item
44094408
for the first overload,
44104409
\begin{itemize}
4411-
\item \tcode{S1} and \tcode{I1} model \tcode{\libconcept{sized_sentinel_for}<S1, I1>},
4412-
\item \tcode{S2} and \tcode{I2} model \tcode{\libconcept{sized_sentinel_for}<S2, I2>}, and
4410+
\item \tcode{S1} models \tcode{\libconcept{sized_sentinel_for}<I1>},
4411+
\item \tcode{S2} models \tcode{\libconcept{sized_sentinel_for}<I2>}, and
44134412
\item \tcode{last1 - first1 != last2 - first2};
44144413
\end{itemize}
44154414
\item

source/iterators.tex

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1418,13 +1418,13 @@
14181418

14191419
\pnum
14201420
A type \tcode{I} other than \cv{}~\tcode{bool} is \defn{integer-like}
1421-
if it models \tcode{\libconcept{integral}<I>} or
1421+
if it models \libconcept{integral} or
14221422
if it is an integer-class type.
14231423
An integer-like type \tcode{I} is \defn{signed-integer-like}
1424-
if it models \tcode{\libconcept{signed_integral}<I>} or
1424+
if it models \libconcept{signed_integral} or
14251425
if it is a signed-integer-class type.
14261426
An integer-like type \tcode{I} is \defn{unsigned-integer-like}
1427-
if it models \tcode{\libconcept{unsigned_integral}<I>} or
1427+
if it models \libconcept{unsigned_integral} or
14281428
if it is an unsigned-integer-class type.
14291429

14301430
\pnum
@@ -1544,7 +1544,7 @@
15441544
\pnum
15451545
Let \tcode{i} be an object of type \tcode{I}. When \tcode{i} is in the domain of
15461546
both pre- and post-increment, \tcode{i} is said to be \defn{incrementable}.
1547-
\tcode{I} models \tcode{\libconcept{weakly_incrementable}<I>} only if
1547+
\tcode{I} models \libconcept{weakly_incrementable} only if
15481548
\begin{itemize}
15491549
\item The expressions \tcode{++i} and \tcode{i++} have the same domain.
15501550
\item If \tcode{i} is incrementable, then both \tcode{++i}
@@ -1654,7 +1654,7 @@
16541654
\pnum
16551655
Let \tcode{s} and \tcode{i} be values of type \tcode{S} and
16561656
\tcode{I} such that \range{i}{s} denotes a range. Types
1657-
\tcode{S} and \tcode{I} model \tcode{\libconcept{sentinel_for}<S, I>} only if
1657+
\tcode{S} models \tcode{\libconcept{sentinel_for}<I>} only if
16581658
\begin{itemize}
16591659
\item \tcode{i == s} is well-defined.
16601660

@@ -1699,7 +1699,7 @@
16991699
a sentinel of type \tcode{S} such that \range{i}{s} denotes a range.
17001700
Let $N$ be the smallest number of applications of \tcode{++i}
17011701
necessary to make \tcode{bool(i == s)} be \tcode{true}.
1702-
\tcode{S} and \tcode{I} model \tcode{\libconcept{sized_sentinel_for}<S, I>} only if
1702+
\tcode{S} models \tcode{\libconcept{sized_sentinel_for}<I>} only if
17031703
\begin{itemize}
17041704
\item If $N$ is representable by \tcode{iter_difference_t<I>},
17051705
then \tcode{s - i} is well-defined and equals $N$.
@@ -3004,9 +3004,9 @@
30043004
\pnum
30053005
\effects
30063006
\begin{itemize}
3007-
\item If \tcode{I} and \tcode{S} model \tcode{\libconcept{assignable_from}<I\&, S>},
3007+
\item If \tcode{I&} models \tcode{\libconcept{assignable_from}<S>},
30083008
equivalent to \tcode{i = std::move(bound)}.
3009-
\item Otherwise, if \tcode{S} and \tcode{I} model \tcode{\libconcept{sized_sentinel_for}<S, I>},
3009+
\item Otherwise, if \tcode{S} models \tcode{\libconcept{sized_sentinel_for}<I>},
30103010
equivalent to \tcode{ranges::advance(i, bound - i)}.
30113011
\item Otherwise, while \tcode{bool(i != bound)} is \tcode{true},
30123012
increments \tcode{i}.
@@ -3026,12 +3026,12 @@
30263026
If \tcode{n == 0}, \range{i}{bound} or \range{bound}{i} denotes a range.
30273027
If \tcode{n < 0}, \range{bound}{i} denotes a range,
30283028
\tcode{I} models \libconcept{bidirectional_iterator}, and
3029-
\tcode{I} and \tcode{S} model \tcode{\libconcept{same_as}<I, S>}.
3029+
\tcode{S} models \tcode{\libconcept{same_as}<I>}.
30303030

30313031
\pnum
30323032
\effects
30333033
\begin{itemize}
3034-
\item If \tcode{S} and \tcode{I} model \tcode{\libconcept{sized_sentinel_for}<S, I>}:
3034+
\item If \tcode{S} models \tcode{\libconcept{sized_sentinel_for}<I>}:
30353035
\begin{itemize}
30363036
\item If \brk{}$|\tcode{n}| \ge |\tcode{bound - i}|$,
30373037
equivalent to \tcode{ranges::advance(i, bound)}.
@@ -5316,8 +5316,7 @@
53165316
Class template \tcode{move_sentinel} is a sentinel adaptor useful for denoting
53175317
ranges together with \tcode{move_iterator}. When an input iterator type
53185318
\tcode{I} and sentinel type \tcode{S} model \tcode{\libconcept{sentinel_for}<S, I>},
5319-
\tcode{move_sentinel<S>} and \tcode{move_iterator<I>} model
5320-
\tcode{\libconcept{sentinel_for}<move_sentinel<S>, move_iterator<I>>} as well.
5319+
\tcode{\libconcept{sentinel_for}<move_sentinel<S>, move_iterator<I>>} is modeled as well.
53215320

53225321
\pnum
53235322
\begin{example}

source/ranges.tex

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -743,10 +743,8 @@
743743

744744
\pnum
745745
\begin{note}
746-
Whenever \tcode{ranges::end(E)} is a valid expression,
747-
the types \tcode{S} and \tcode{I} of
748-
\tcode{ranges::end(E)} and \tcode{ranges::begin(E)}
749-
model \tcode{\libconcept{sentinel_for}<S, I>}.
746+
Whenever \tcode{ranges::end(E)} is a valid expression, its type models
747+
\tcode{\libconcept{sentinel_for}<decltype(ranges::begin(E))>}.
750748
\end{note}
751749

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

800798
\pnum
801799
\begin{note}
802-
Whenever \tcode{ranges::cend(E)} is a valid expression,
803-
the types \tcode{S} and \tcode{I} of the expressions
804-
\tcode{ranges::cend(E)} and \tcode{ranges::cbegin(E)}
805-
model \tcode{\libconcept{sentinel_for}<S, I>}.
806-
If \tcode{S} models \libconcept{input_iterator},
807-
then \tcode{S} also models \exposconceptx{constant-itera\-tor}{constant-iterator}.
800+
Whenever \tcode{ranges::cend(E)} is a valid expression, its type models
801+
\tcode{\libconcept{sentinel_for}<decltype(ranges::cbegin(E))>}.
802+
If the type of \tcode{ranges::cend(E)} models \libconcept{input_iterator},
803+
then it also models \exposconcept{constant-iterator}.
808804
\end{note}
809805

810806
\rSec2[range.access.rbegin]{\tcode{ranges::rbegin}}
@@ -897,7 +893,7 @@
897893
\item
898894
Otherwise, if \tcode{auto(t.rend())}
899895
is a valid expression whose type models
900-
\tcode{\libconcept{sentinel_for}<decltype(\brk{}ranges::rbegin(E))>}
896+
\tcode{\libconcept{sentinel_for}<decltype(\brk{}ranges::rbegin(E))>},
901897
then \tcode{ranges::rend(E)} is expression-equivalent to
902898
\tcode{auto(t.rend())}.
903899

@@ -931,10 +927,8 @@
931927

932928
\pnum
933929
\begin{note}
934-
Whenever \tcode{ranges::rend(E)} is a valid expression,
935-
the types \tcode{S} and \tcode{I} of the expressions
936-
\tcode{ranges::rend(E)} and \tcode{ranges::rbegin(E)}
937-
model \tcode{\libconcept{sentinel_for}<S, I>}.
930+
Whenever \tcode{ranges::rend(E)} is a valid expression, its type models
931+
\tcode{\libconcept{sentinel_for}<decltype(ranges::rbegin(E))>}.
938932
\end{note}
939933

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

989983
\pnum
990984
\begin{note}
991-
Whenever \tcode{ranges::crend(E)} is a valid expression,
992-
the types \tcode{S} and \tcode{I} of the expressions
993-
\tcode{ranges::crend(E)} and \tcode{ranges::crbegin(E)}
994-
model \tcode{\libconcept{sentinel_for}<S, I>}.
995-
If \tcode{S} models \libconcept{input_iterator},
996-
then \tcode{S} also models \exposconceptx{constant-itera\-tor}{constant-iterator}.
985+
Whenever \tcode{ranges::crend(E)} is a valid expression, its type models
986+
\tcode{\libconcept{sentinel_for}<decltype(ranges::crbegin(E))>}.
987+
If the type of \tcode{ranges::crend(E)} models \libconcept{input_iterator},
988+
then it also models \exposconcept{constant-iterator}.
997989
\end{note}
998990

999991
\rSec2[range.prim.size]{\tcode{ranges::size}}

0 commit comments

Comments
 (0)