The C++ STL (Standard Template Library) is a generic collection of class templates and algorithms that allow programmers to easily implement standard data structures like queues, lists and stacks.
The C++ STL provides two kinds of containers:
In addition, the C++ standard library provides several non-STL containers.
They can be considered containers, but don't meet all the requirements of STL containers.
The idea behind the C++ STL is that the hard part of using complex data structures has already been completed. If a programmer would like to use a stack of integers, all one has to do is use this code:
With minimal effort, one can now push and pop integers onto this stack. Through the magic of C++ Templates, one could specify any data type, not just integers. The STL Stack class will provide generic functionality of a stack, regardless of the data in the stack.
C++ Iterators provide a generic way of iterating over the STL containers or other data structures.
The <functional> header file defines function objects and function adapters.