Six components in Qianfeng c++_stl library

The basic concept of stl

STL (standard templa library), developed by Hewlett-Packard Labs, and then open source integrated on c++.
STL is broadly divided into: containers, algorithms, iterators, containers and algorithms are connected by iterators.
Almost all STL code uses template classes and template functions.

Six components of STL

Container: the spatial structure vector, queue, deque, map, set, list for storing data
Insert picture description here

Algorithm (algorithms): specific solution steps sort, find, for_each
Insert picture description here

Iterator (iterator): essentially a pointer to
Insert picture description here
Insert picture description here
obtain the format of the iterator
Insert picture description here

Functor: The object of the function overloads the class of operator()

Adapter: used to modify functors (usually used to expand the parameter interface)

Space configurator: responsible for memory space application release management, etc.

Guess you like

Origin blog.csdn.net/qq_45788043/article/details/108856266