33. STL Iterators

The reason that STL containers and algorithms work so well together is that they know nothing of each other.

– Alex Stepanov

Introduction

Iterator Model

Iterator Categories; Iterator Traits; Iterator Operations

Iterator Adaptors

Reverse Iterators; Insert Iterators; Move Iterator

Range Access Functions

Function Objects

Function Adaptors

bind(); mem_fn(); function

Advice

33.1. Introduction

This chapter presents the STL iterators and utilities, notably standard-library function objects. The STL consists of the iterator, container, algorithm, and function object parts of the standard library. The rest of the STL is presented in Chapter 31 and Chapter 32.

Iterators are the glue that ties standard-library algorithms ...

Get The C++ Programming Language, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.