Surveying the contents and purpose of the STL
The Standard Template Library in C++ is a library of standard classes and utilities that extend the C++ language. The use of the STL is so pervasive that it is as though the STL is a part of the language itself; it is an essential and integral part of C++. The STL in C++ has four key components comprising the library: containers, iterators, functions, and algorithms.
The STL has additionally influenced the C++ Standard Library in providing a set of programming standards; the two libraries actually share common features and components, most notably containers and iterators. We’ve already utilized components from the Standard Library, namely <iostream>
for IOStreams, <exception>
for exception handling, and <new>
for operators new()
and delete()
. In this chapter, we will explore many overlapping components between the STL and the Standard Library in C++.
The STL has a full line of container classes. These classes...