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