Chapter 3. Container Basics
Ah, when she moved, she moved more ways than one:The shapes a bright container can contain!
— “I Knew a Woman”THEODORE ROETHKE
The Standard Template Library, more commonly known as the STL, is the invention of Dave Musser, Alex Stepanov, and Meng Lee. The design of the STL factors common programming tasks into four fundamental components: sequences, algorithms, iterators, and callable types. As we’ll see, the STL and the standard C++ library provide templates that aid in programming with all four of these components.
In addition, the STL and the standard C++ library have several containers that hold sequences of elements. The TR1 library provides five new containers: a fixed-size array (Chapter 4), unordered ...