Chapter Overview

Get an idea of what we'll cover in this chapter.

We'll cover the following...

As an introduction to iterators, let's proceed with the following recipes in this chapter:

  • Create an iterable range
  • Make our iterators compatible with STL iterator traits
  • Use iterator adapters to fill STL containers
  • Create a generator as iterators
  • Use reverse iterator adapters to iterate backward
  • Iterate objects of unknown length with a sentinel
  • Build a zip iterator adapter
  • Create a random-access iterator