The C++ STL offers the programmer a number of useful data structures and algorithms. It is made up by the following components.
Containers. There are two types:
- Sequential. This group comprises the vector, list and deque types.
- Sorted Associative. This group comprises the set, map, multiset and multimap types.
- Iterators. These are pointer like objects that allow the user to step through the contents of a container.
- Generic Algorithms. The C++ STL provides a wide range of efficently implemented standard algorithms (for example find, sort and merge) that work with the container types. (Some of the containers have special purpose implementations of these algorithms as member functions.)
- Function Objects. A function object is an instance of a class that provides a definition of operator(). This means that you can use such an object like a function.
- Adaptors. The C++ STL provides
- Container adaptors that allow the user to use, say, a vector as the basis of a stack.
- Function adaptors that allow the user to construct new function objects from existing function objects.
- Allocators. Every C++ STL container class uses an Allocator class to hold information about the memory model the program is using. I shall totally ignore this aspect of the C++ STL.