From wikipedia, the Standard Template Library (STL) is a software library for the C++ programming language that influenced many parts of the C++ Standard Library. It provides four components called:
-
algorithms
A large number of algorithms to perform activities such as searching and sorting are provided in the STL, each implemented to require a certain level of iterator.
-
containers
The STL contains sequence containers and associative containers. The containers are objects that store data.
The standard sequence containers include
vector
,deque
, andlist
.The standard associative containers are
set
,multiset
,map
,multimap
,hash_set
,hash_map
,hash_multiset
,hash_multimap
.There are also container adaptors
queue
,priority_queue
,stack
, that are containers with specific interface, using other containers as implementation. -
functions
The STL includes classes that overload the function call operator(
operator()
). Instances of such classes are called functions or function objects. -
iterators
The STL implements five different types of iteartors. These are :
-
input iterators
Only be used to read a sequence of values
-
output iterators
Only be used to write a sequence of values
-
forward iterators
Can be read, written to, and move forward
-
bidirectional iterators
Like forward iterators, but can also move backwards
-
random access iterators
Can move freely any number of steps in one operation
-
The STL provides a set of common classes for C++, 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)
From wikipedia, the C++ Standard Library is a collection of classes and functions, which are written in the core language and part of the C++ ISO Stardard itself.
The C++ Standard Library is based upon conventions introduced by the Standard Template Library (STL), and has been influced by research in generic programming and developers of the STL such as Alexander Stepanov and Meng Lee.
Although the C++ Standard Library and the STL share many features, neither is a stict superset of the other.
From wikipedia, Alexander Stepanov is a Russian-American computer programmer, best known as an adcocate of generic programming and as the primary designer and implementer of the C++ Standard Template Library, which he started to develop around 1992 while employed at HP Labs.
BOOKs:
《 From Mathematics to Generic Programming》
He tries to convince Bjarne Stroustrup to introduce something like Ada generics in C++/
Stepanov’s genius changed the way we program.
The “STL” was written by Alexander Stepanov in the days long before C++ was standardised.
C++ existed through the 80s, but what we now call “C++” is the language standardised in ISO/IEC 14882:1998(《理解gcc||g++||C11等版本问题》).
The STL (Written in 1992) was already widely used as a library for C++,giving programmers access to containers
, iterators
and algorithms
. When the standardisation happened, the language committe designed parts of the C++ Standard Library (which is part of the language standard) to very closely mathc the STL.
Silicon Graphics has made its implementation of the C++ Standard Template Library freely available to the public.
SGI is one kind of STL implementation versions.