|
1435 | 1435 | \end{itemize}
|
1436 | 1436 |
|
1437 | 1437 | \pnum
|
| 1438 | +\recommended |
| 1439 | +The implementaton of an algorithm on a weakly incrementable type |
| 1440 | +should never attempt to pass through the same incrementable value twice; |
| 1441 | +such an algorithm should be a single-pass algorithm. |
1438 | 1442 | \begin{note}
|
1439 | 1443 | For \libconcept{weakly_incrementable} types, \tcode{a} equals \tcode{b} does not imply that \tcode{++a}
|
1440 | 1444 | equals \tcode{++b}. (Equality does not guarantee the substitution property or referential
|
1441 |
| -transparency.) Algorithms on weakly incrementable types should never attempt to pass |
1442 |
| -through the same incrementable value twice. They should be single-pass algorithms. These algorithms |
| 1445 | +transparency.) |
| 1446 | +Such algorithms |
1443 | 1447 | can be used with istreams as the source of the input data through the \tcode{istream_iterator} class
|
1444 | 1448 | template.
|
1445 | 1449 | \end{note}
|
|
1667 | 1671 | \end{codeblock}
|
1668 | 1672 |
|
1669 | 1673 | \pnum
|
1670 |
| -\begin{note} |
1671 |
| -Algorithms on output iterators should never attempt to pass through the same iterator twice. |
1672 |
| -They should be single-pass algorithms. |
1673 |
| -\end{note} |
| 1674 | +\recommended |
| 1675 | +The implementation of an algorithm on output iterators |
| 1676 | +should never attempt to pass through the same iterator twice; |
| 1677 | +such an algorithm should be a single-pass algorithm. |
1674 | 1678 |
|
1675 | 1679 | \rSec3[iterator.concept.forward]{Concept \cname{forward_iterator}}
|
1676 | 1680 |
|
|
2013 | 2017 | \end{libreqtab4b}
|
2014 | 2018 |
|
2015 | 2019 | \pnum
|
| 2020 | +\recommended |
| 2021 | +The implementation of an algorithm on input iterators |
| 2022 | +should never attempt to pass through the same iterator twice; |
| 2023 | +such an algorithm should be a single pass algorithm. |
2016 | 2024 | \begin{note}
|
2017 |
| -For input iterators, |
2018 |
| -\tcode{a == b} |
2019 |
| -does not imply |
2020 |
| -\tcode{++a == ++b}. |
| 2025 | +For input iterators, \tcode{a == b} does not imply \tcode{++a == ++b}. |
2021 | 2026 | (Equality does not guarantee the substitution property or referential transparency.)
|
2022 |
| -Algorithms on input iterators should never attempt to pass through the same iterator twice. |
2023 |
| -They should be |
2024 |
| -\term{single pass} |
2025 |
| -algorithms. |
2026 | 2027 | Value type \tcode{T} is not required to be a \oldconcept{CopyAssignable} type (\tref{cpp17.copyassignable}).
|
2027 |
| -These algorithms can be used with istreams as the source of the input data through the |
| 2028 | +Such an algorithm can be used with istreams as the source of the input data through the |
2028 | 2029 | \tcode{istream_iterator}
|
2029 | 2030 | class template.
|
2030 | 2031 | \end{note}
|
|
2074 | 2075 | \end{libreqtab4b}
|
2075 | 2076 |
|
2076 | 2077 | \pnum
|
| 2078 | +\recommended |
| 2079 | +The implementation of an algorithm on output iterators |
| 2080 | +should never attempt to pass through the same iterator twice; |
| 2081 | +such an algorithm should be a single-pass algorithm. |
2077 | 2082 | \begin{note}
|
2078 |
| -The only valid use of an |
2079 |
| -\tcode{operator*} |
| 2083 | +The only valid use of an \tcode{operator*} |
2080 | 2084 | is on the left side of the assignment statement.
|
2081 | 2085 | Assignment through the same value of the iterator happens only once.
|
2082 |
| -Algorithms on output iterators should never attempt to pass through the same iterator twice. |
2083 |
| -They should be single-pass algorithms. |
2084 | 2086 | Equality and inequality might not be defined.
|
2085 | 2087 | \end{note}
|
2086 | 2088 |
|
|
0 commit comments