|
The Standard Template Library (STL) is a software library. It is part of the C++ Standard Library describing containers, iterators, and algorithms.
Overview
The STL has been a major boon for C++ programmers: it gives the programmer a ready-made set of common classes, such as containers and associative arrays, that can be used with any built-in type, and with any user-defined type that supports some elementary operations such as copying and assignment.
The STL achieves this result through the heavy use of templates. While this approach is very powerful, the resulting complicated code was (and sometimes still is) a problem for many compilers, which sometimes failed to compile valid constructs, produced invalid code, or required the programmer to put in extra effort to get things to work.
The C++ Standard Library is defined by ISO/IEC 14882.
Contents
Containers
The STL contains sequence containers and associative containers. The standard sequence containers include vector, string and deque. The standard associative containers are set, multiset, map and multimap.
Iterators
The STL implements five different types of iterators. These are input iterators, output iterators, forward iterators, bidirectional iterators and random access iterators.
Functors
The STL includes classes that overload the function operator (operator()). Classses that do this are called functor classes or function classes.
References
External links
|