|
69 | 69 | Throughout this Clause, where the template parameters are not constrained,
|
70 | 70 | the names of template parameters are used to express type requirements.
|
71 | 71 | \begin{itemize}
|
| 72 | +\item |
| 73 | + If an algorithm's \Fundescx{Effects} element specifies |
| 74 | + that a value pointed to by any iterator passed as an argument is modified, |
| 75 | + then the type of that argument shall meet |
| 76 | + the requirements of a mutable iterator\iref{iterator.requirements}. |
72 | 77 | \item
|
73 | 78 | If an algorithm's template parameter is named
|
74 | 79 | \tcode{InputIterator},
|
|
86 | 91 | \item
|
87 | 92 | If an algorithm's template parameter is named
|
88 | 93 | \tcode{ForwardIterator},
|
89 |
| - \tcode{ForwardIterator1}, or |
90 |
| - \tcode{Forward\-Iterator2}, |
| 94 | + \tcode{ForwardIterator1}, |
| 95 | + \tcode{ForwardItera\-tor2}, or |
| 96 | + \tcode{NoThrowForwardIterator}, |
91 | 97 | the template argument shall meet the
|
92 |
| - \oldconcept{ForwardIterator} requirements\iref{forward.iterators}. |
| 98 | + \oldconcept{ForwardIterator} requirements\iref{forward.iterators} |
| 99 | + if it is required to be a mutable iterator, or |
| 100 | + model \libconcept{forward_iterator}\iref{iterator.concept.forward} otherwise. |
93 | 101 | \item
|
94 | 102 | If an algorithm's template parameter is named
|
95 | 103 | \tcode{NoThrowForwardIterator},
|
96 |
| - the template argument shall meet the |
97 |
| - \oldconcept{ForwardIterator} requirements\iref{forward.iterators}, and |
98 |
| - is required to have the property that no exceptions are thrown |
| 104 | + the template argument |
| 105 | + is also required to have the property that no exceptions are thrown |
99 | 106 | from increment, assignment, or comparison of, or
|
100 | 107 | indirection through, valid iterators.
|
101 | 108 | \item
|
|
104 | 111 | \tcode{Bidirectional\-Iterator1}, or
|
105 | 112 | \tcode{BidirectionalIterator2},
|
106 | 113 | the template argument shall meet the
|
107 |
| - \oldconcept{BidirectionalIterator} requirements\iref{bidirectional.iterators}. |
| 114 | + \oldconcept{BidirectionalIterator} requirements\iref{bidirectional.iterators} |
| 115 | + if it is required to be a mutable iterator, or model |
| 116 | + \libconcept{bidirectional_iterator}\iref{iterator.concept.bidir} otherwise. |
108 | 117 | \item
|
109 | 118 | If an algorithm's template parameter is named
|
110 | 119 | \tcode{RandomAccessIterator},
|
111 | 120 | \tcode{Random\-AccessIterator1}, or
|
112 | 121 | \tcode{RandomAccessIterator2},
|
113 | 122 | the template argument shall meet the
|
114 |
| - \oldconcept{RandomAccessIterator} requirements\iref{random.access.iterators}. |
| 123 | + \oldconcept{RandomAccessIterator} requirements\iref{random.access.iterators} |
| 124 | + if it is required to be a mutable iterator, or model |
| 125 | + \libconcept{random_access_iterator}\iref{iterator.concept.random.access} otherwise. |
115 | 126 | \end{itemize}
|
116 |
| - |
117 |
| -\pnum |
118 |
| -If an algorithm's \effects element specifies |
119 |
| -that a value pointed to by any iterator passed as an argument is modified, |
120 |
| -then that algorithm has an additional type requirement: |
121 |
| -The type of that argument shall meet |
122 |
| -the requirements of a mutable iterator\iref{iterator.requirements}. |
123 | 127 | \begin{note}
|
124 |
| -This requirement does not affect arguments that are named |
125 |
| -\tcode{OutputIterator}, \tcode{OutputIterator1}, or \tcode{OutputIterator2}, |
126 |
| -because output iterators must always be mutable, nor |
127 |
| -does it affect arguments that are constrained, |
128 |
| -for which mutability requirements are expressed explicitly. |
| 128 | +These requirements do not affect iterator arguments that are constrained, |
| 129 | +for which iterator category and mutability requirements |
| 130 | +are expressed explicitly. |
129 | 131 | \end{note}
|
130 | 132 |
|
131 | 133 | \pnum
|
|
6033 | 6035 | \item
|
6034 | 6036 | For the overloads with no \tcode{ExecutionPolicy},
|
6035 | 6037 | let \tcode{T} be the value type of \tcode{InputIterator}.
|
6036 |
| - If \tcode{InputIterator} meets |
6037 |
| - the \oldconcept{ForwardIterator} requirements, |
| 6038 | + If \tcode{InputIterator} models |
| 6039 | + \libconcept{forward_iterator}\iref{iterator.concept.forward}, |
6038 | 6040 | then there are no additional requirements for \tcode{T}.
|
6039 | 6041 | Otherwise, if \tcode{OutputIterator} meets
|
6040 | 6042 | the \oldconcept{ForwardIterator} requirements and
|
|
6339 | 6341 | \item
|
6340 | 6342 | \tcode{SampleIterator} meets
|
6341 | 6343 | the \oldconcept{RandomAccessIterator} requirements\iref{random.access.iterators}
|
6342 |
| - unless \tcode{Pop\-ulat\-ion\-Iter\-ator} meets |
6343 |
| - the \oldconcept{ForwardIterator} requirements\iref{forward.iterators}. |
| 6344 | + unless \tcode{Pop\-ulat\-ion\-Iter\-ator} |
| 6345 | + models \libconcept{forward_iterator}\iref{iterator.concept.forward}. |
6344 | 6346 | \item
|
6345 | 6347 | \tcode{remove_reference_t<UniformRandomBitGenerator>} meets
|
6346 | 6348 | the requirements of a uniform random bit generator type\iref{rand.req.urng}.
|
|
6369 | 6371 | \begin{itemize}
|
6370 | 6372 | \item
|
6371 | 6373 | For the overload in namespace \tcode{std},
|
6372 |
| - stable if and only if \tcode{PopulationIterator} meets |
6373 |
| - the \oldconcept{For\-wardIterator} requirements. |
| 6374 | + stable if and only if \tcode{PopulationIterator} |
| 6375 | + models \libconcept{forward_iterator}. |
6374 | 6376 | For the first overload in namespace \tcode{ranges},
|
6375 | 6377 | stable if and only if \tcode{I} models \libconcept{forward_iterator}.
|
6376 | 6378 | \item
|
|
0 commit comments