| InputIterator |
<iterator> |
Input iterator category
![]() |
![]() |
![]() |
Input |
|||
![]() |
Input iterators are iterators especially designed for sequential input operations, where each value pointed by the iterator is read only once and then the iterator is incremented.
They have the following characteristics:
| characteristic | valid expressions |
|---|---|
| Can be copied and copy-constructed | X b(a); b = a; |
| Accepts equality/inequality comparisons | a == b a != b |
| Can be dereferenced as an rvalue (when not null). Each value only needs to be dereferenceable once (algorithms using InputIterator are single pass algorithms) | *a a->m |
| Can be incremented (when not null) | ++a a++ *a++ |
| Value type does not need to be assignable | t = u not needed |
See also
| OutputIterator | Output iterator category |
| ForwardIterator | Forward iterator category |
| BidirectionalIterator | Bidirectional iterator category |
| RandomAccessIterator | Random-access iterator category |
| iterator | Iterator definitions (header) |

