Iteration patterns using Boost.Iterator
Iteration is a fundamental task in most programming problems, whether it is iterating through the elements of a container, a series of natural numbers, or the files in a directory. By abstracting how a collection of values is iterated through, we can write generic code to process such a collection without depending on methods of iteration specific to each collection.
The Standard Library containers expose iterators for this purpose, and the generic algorithms in the Standard Library can operate on any conforming container through its iterators, without depending on the specific type of the container or its internal structure.
The Boost.Iterator library provides a framework for writing iterators for custom ...