June 2025
Intermediate to advanced
1093 pages
33h 24m
English
Iterators fall into different categories regarding the operations they support. This is a simple linear hierarchy: the higher the category in this hierarchy, the more operations that iterators of that category support.
The exception is the output iterators, which require additional properties but do not necessarily bring any of the other categories with them.
|
Iterator Category |
Provider |
|---|---|
|
Contiguous |
vector, string, array |
|
Random access |
deque |
|
Bidirectional |
list, [multi]set, multiset, [multi]map |
|
Forward |
forward_list, unordered_[multi]{map|set} |
|
Output |
ostream, inserter |
|
Input |
istream |
Table 24.2 Which containers and streams provide iterators of which category?
There are some ...
Read now
Unlock full access