June 2025
Intermediate to advanced
1093 pages
33h 24m
English
Iterators are a central part of the standard library and primarily a concept. Through further abstractions, the behavior of algorithms can be modified surprisingly often using iterator adapters without disturbing the idea. Many of these adapters can be found in <iterator>. I cannot cover all possible combinations in the explanatory list about algorithms, but to give your imagination some stimulus, here are some examples:
With a move_iterator, you can convert all copy operations of an algorithm into move operations.
With back_inserter, you do not need a preexisting target range; instead, each copy is converted into a push_back.
The same is done by front_inserter, but it calls push_front.
Even more flexible is ...
Read now
Unlock full access