Iterator Categories of the Standard Template Library

A key factor in the design of STL is the consistent use of iterators, which generalize C++ pointers, as intermediaries between algorithms and containers. A precise classification of iterators into five categories is the basis for determining which algorithms can be used with which containers, and is the main guide to extension of the library to include new algorithms that work with STL containers, or new containers to which many STL generic algorithms can be applied.

The scheme used to determine which algorithms and containers can be combined consists of three parts:

Iterator categories

Category of iterators provided by each STL container type