|
156 | 156 | the only exceptions are destroying an iterator that holds a singular value,
|
157 | 157 | the assignment of a non-singular value to
|
158 | 158 | an iterator that holds a singular value, and, for iterators that satisfy the
|
159 |
| -\tcode{DefaultConstructible} requirements, using a value-initialized iterator |
| 159 | +\oldconcept{DefaultConstructible} requirements, using a value-initialized iterator |
160 | 160 | as the source of a copy or move operation. \begin{note} This guarantee is not
|
161 | 161 | offered for default-initialization, although the distinction only matters for types
|
162 | 162 | with trivial default constructors such as pointers or aggregates holding pointers.
|
|
265 | 265 | \begin{note} For an iterator type \tcode{X} there must be an instantiation
|
266 | 266 | of \tcode{iterator_traits<X>}\iref{iterator.traits}. \end{note}
|
267 | 267 |
|
268 |
| -\rSec2[iterator.iterators]{Iterator} |
| 268 | +\rSec2[iterator.iterators]{\oldconcept{Iterator}} |
269 | 269 |
|
270 | 270 | \pnum
|
271 |
| -The \tcode{Iterator} requirements form the basis of the iterator |
272 |
| -taxonomy; every iterator satisfies the \tcode{Iterator} requirements. This |
| 271 | +The \oldconcept{Iterator} requirements form the basis of the iterator |
| 272 | +taxonomy; every iterator satisfies the \oldconcept{Iterator} requirements. This |
273 | 273 | set of requirements specifies operations for dereferencing and incrementing
|
274 | 274 | an iterator. Most algorithms will require additional operations to
|
275 | 275 | read\iref{input.iterators} or write\iref{output.iterators} values, or
|
276 | 276 | to provide a richer set of iterator movements~(\ref{forward.iterators},
|
277 | 277 | \ref{bidirectional.iterators}, \ref{random.access.iterators}).
|
278 | 278 |
|
279 | 279 | \pnum
|
280 |
| -A type \tcode{X} satisfies the \tcode{Iterator} requirements if: |
| 280 | +A type \tcode{X} satisfies the \oldconcept{Iterator} requirements if: |
281 | 281 |
|
282 | 282 | \begin{itemize}
|
283 |
| -\item \tcode{X} satisfies the \tcode{CopyConstructible}, \tcode{CopyAssignable}, and |
284 |
| -\tcode{Destructible} requirements\iref{utility.arg.requirements} and lvalues |
| 283 | +\item \tcode{X} satisfies the \oldconcept{CopyConstructible}, \oldconcept{CopyAssignable}, and |
| 284 | +\oldconcept{Destructible} requirements\iref{utility.arg.requirements} and lvalues |
285 | 285 | of type \tcode{X} are swappable\iref{swappable.requirements}, and
|
286 | 286 |
|
287 | 287 | \item the expressions in \tref{iterator.requirements} are valid and have
|
288 | 288 | the indicated semantics.
|
289 | 289 | \end{itemize}
|
290 | 290 |
|
291 | 291 | \begin{libreqtab4b}
|
292 |
| -{Iterator requirements} |
| 292 | +{\oldconcept{Iterator} requirements} |
293 | 293 | {tab:iterator.requirements}
|
294 | 294 | \\ \topline
|
295 | 295 | \lhdr{Expression} & \chdr{Return type} & \chdr{Operational} & \rhdr{Assertion/note} \\
|
|
321 | 321 | satisfies the requirements of an input iterator for the value type
|
322 | 322 | \tcode{T}
|
323 | 323 | if
|
324 |
| -\tcode{X} satisfies the \tcode{Iterator}\iref{iterator.iterators} and |
325 |
| -\tcode{EqualityComparable} (\tref{equalitycomparable}) requirements and |
| 324 | +\tcode{X} satisfies the \oldconcept{Iterator}\iref{iterator.iterators} and |
| 325 | +\oldconcept{EqualityComparable} (\tref{equalitycomparable}) requirements and |
326 | 326 | the expressions in \tref{iterator.input.requirements} are valid and have
|
327 | 327 | the indicated semantics.
|
328 | 328 |
|
|
356 | 356 | \end{example}
|
357 | 357 |
|
358 | 358 | \begin{libreqtab4b}
|
359 |
| -{Input iterator requirements (in addition to Iterator)} |
| 359 | +{\oldconcept{InputIterator} requirements (in addition to \oldconcept{Iterator})} |
360 | 360 | {tab:iterator.input.requirements}
|
361 | 361 | \\ \topline
|
362 | 362 | \lhdr{Expression} & \chdr{Return type} & \chdr{Operational} & \rhdr{Assertion/note} \\
|
|
414 | 414 | They should be
|
415 | 415 | \term{single pass}
|
416 | 416 | algorithms.
|
417 |
| -Value type \tcode{T} is not required to be a \tcode{CopyAssignable} type (\tref{copyassignable}). |
| 417 | +Value type \tcode{T} is not required to be a \oldconcept{CopyAssignable} type (\tref{copyassignable}). |
418 | 418 | These algorithms can be used with istreams as the source of the input data through the
|
419 | 419 | \tcode{istream_iterator}
|
420 | 420 | class template.
|
|
426 | 426 | A class or pointer type
|
427 | 427 | \tcode{X}
|
428 | 428 | satisfies the requirements of an output iterator
|
429 |
| -if \tcode{X} satisfies the \tcode{Iterator} requirements\iref{iterator.iterators} |
| 429 | +if \tcode{X} satisfies the \oldconcept{Iterator} requirements\iref{iterator.iterators} |
430 | 430 | and the expressions in \tref{iterator.output.requirements}
|
431 | 431 | are valid and have the indicated semantics.
|
432 | 432 |
|
433 | 433 | \begin{libreqtab4b}
|
434 |
| -{Output iterator requirements (in addition to Iterator)} |
| 434 | +{\oldconcept{OutputIterator} requirements (in addition to \oldconcept{Iterator})} |
435 | 435 | {tab:iterator.output.requirements}
|
436 | 436 | \\ \topline
|
437 | 437 | \lhdr{Expression} & \chdr{Return type} & \chdr{Operational} & \rhdr{Assertion/note} \\
|
|
494 | 494 | satisfies the requirements of a forward iterator if
|
495 | 495 |
|
496 | 496 | \begin{itemize}
|
497 |
| -\item \tcode{X} satisfies the requirements of an input iterator\iref{input.iterators}, |
| 497 | +\item \tcode{X} satisfies the \oldconcept{InputIterator} requirements\iref{input.iterators}, |
498 | 498 |
|
499 |
| -\item \tcode{X} satisfies the \tcode{DefaultConstructible} |
| 499 | +\item \tcode{X} satisfies the \oldconcept{DefaultConstructible} |
500 | 500 | requirements\iref{utility.arg.requirements},
|
501 | 501 |
|
502 | 502 | \item if \tcode{X} is a mutable iterator, \tcode{reference} is a reference to \tcode{T};
|
|
539 | 539 | \end{note}
|
540 | 540 |
|
541 | 541 | \begin{libreqtab4b}
|
542 |
| -{Forward iterator requirements (in addition to input iterator)} |
| 542 | +{\oldconcept{ForwardIterator} requirements (in addition to \oldconcept{InputIterator})} |
543 | 543 | {tab:iterator.forward.requirements}
|
544 | 544 | \\ \topline
|
545 | 545 | \lhdr{Expression} & \chdr{Return type} & \chdr{Operational} & \rhdr{Assertion/note} \\
|
|
576 | 576 | A class or pointer type
|
577 | 577 | \tcode{X}
|
578 | 578 | satisfies the requirements of a bidirectional iterator if,
|
579 |
| -in addition to satisfying the requirements for forward iterators, |
| 579 | +in addition to satisfying the \oldconcept{ForwardIterator} requirements, |
580 | 580 | the following expressions are valid as shown in \tref{iterator.bidirectional.requirements}.
|
581 | 581 |
|
582 | 582 | \begin{libreqtab4b}
|
583 |
| -{Bidirectional iterator requirements (in addition to forward iterator)} |
| 583 | +{\oldconcept{BidirectionalIterator} requirements (in addition to \oldconcept{ForwardIterator})} |
584 | 584 | {tab:iterator.bidirectional.requirements}
|
585 | 585 | \\ \topline
|
586 | 586 | \lhdr{Expression} & \chdr{Return type} & \chdr{Operational} & \rhdr{Assertion/note} \\
|
|
621 | 621 | A class or pointer type
|
622 | 622 | \tcode{X}
|
623 | 623 | satisfies the requirements of a random access iterator if,
|
624 |
| -in addition to satisfying the requirements for bidirectional iterators, |
| 624 | +in addition to satisfying the \oldconcept{BidirectionalIterator} requirements, |
625 | 625 | the following expressions are valid as shown in \tref{iterator.random.access.requirements}.
|
626 | 626 |
|
627 | 627 | \begin{libreqtab4b}
|
628 |
| -{Random access iterator requirements (in addition to bidirectional iterator)} |
| 628 | +{\oldconcept{RandomAccessIterator} requirements (in addition to \oldconcept{BidirectionalIterator})} |
629 | 629 | {tab:iterator.random.access.requirements}
|
630 | 630 | \\ \topline
|
631 | 631 | \lhdr{Expression} & \chdr{Return type} & \chdr{Operational} & \rhdr{Assertion/note} \\
|
|
1127 | 1127 | \begin{itemdescr}
|
1128 | 1128 | \pnum
|
1129 | 1129 | \effects
|
1130 |
| -If \tcode{InputIterator} meets the requirements of random access iterator, |
| 1130 | +If \tcode{InputIterator} meets the \oldconcept{RandomAccessIterator} requirements, |
1131 | 1131 | returns \tcode{(last - first)}; otherwise, returns
|
1132 | 1132 | the number of increments needed to get from
|
1133 | 1133 | \tcode{first}
|
|
1136 | 1136 |
|
1137 | 1137 | \pnum
|
1138 | 1138 | \requires
|
1139 |
| -If \tcode{InputIterator} meets the requirements of random access iterator, |
| 1139 | +If \tcode{InputIterator} meets the \oldconcept{RandomAccessIterator} requirements, |
1140 | 1140 | \tcode{last} shall be reachable from \tcode{first} or \tcode{first} shall be
|
1141 | 1141 | reachable from \tcode{last}; otherwise,
|
1142 | 1142 | \tcode{last}
|
|
1261 | 1261 | \pnum
|
1262 | 1262 | The template parameter
|
1263 | 1263 | \tcode{Iterator}
|
1264 |
| -shall satisfy all the requirements of a Bidirectional Iterator\iref{bidirectional.iterators}. |
| 1264 | +shall satisfy all the requirements of a \oldconcept{BidirectionalIterator}\iref{bidirectional.iterators}. |
1265 | 1265 |
|
1266 | 1266 | \pnum
|
1267 | 1267 | Additionally,
|
1268 | 1268 | \tcode{Iterator}
|
1269 |
| -shall satisfy the requirements of a random access iterator\iref{random.access.iterators} |
| 1269 | +shall satisfy the requirements of a \oldconcept{RandomAccessIterator}\iref{random.access.iterators} |
1270 | 1270 | if any of the members
|
1271 | 1271 | \tcode{operator+},
|
1272 | 1272 | \tcode{operator-},
|
|
2148 | 2148 |
|
2149 | 2149 | \pnum
|
2150 | 2150 | The template parameter \tcode{Iterator} shall satisfy
|
2151 |
| -the requirements of an input iterator\iref{input.iterators}. |
| 2151 | +the \oldconcept{InputIterator} requirements\iref{input.iterators}. |
2152 | 2152 | Additionally, if any of the bidirectional or random access traversal
|
2153 | 2153 | functions are instantiated, the template parameter shall satisfy the
|
2154 |
| -requirements for a Bidirectional Iterator\iref{bidirectional.iterators} |
2155 |
| -or a Random Access Iterator\iref{random.access.iterators}, respectively. |
| 2154 | +\oldconcept{BidirectionalIterator} requirements\iref{bidirectional.iterators} |
| 2155 | +or \oldconcept{RandomAccessIterator} requirements\iref{random.access.iterators}, respectively. |
2156 | 2156 |
|
2157 | 2157 | \rSec3[move.iter.ops]{\tcode{move_iterator} operations}
|
2158 | 2158 |
|
|
2548 | 2548 | The behavior of a program that applies \tcode{operator++()} to an end-of-stream
|
2549 | 2549 | iterator is undefined.
|
2550 | 2550 | It is impossible to store things into istream iterators.
|
2551 |
| -The type \tcode{T} shall satisfy the \tcode{DefaultConstructible}, |
2552 |
| -\tcode{CopyConstructible}, and \tcode{CopyAssignable} requirements. |
| 2551 | +The type \tcode{T} shall satisfy the \oldconcept{DefaultConstructible}, |
| 2552 | +\oldconcept{CopyConstructible}, and \oldconcept{CopyAssignable} requirements. |
2553 | 2553 |
|
2554 | 2554 | \pnum
|
2555 | 2555 | Two end-of-stream iterators are always equal.
|
|
0 commit comments