当前位置:网站首页>[analysis of STL source code] functions and applications of six STL components (directory)
[analysis of STL source code] functions and applications of six STL components (directory)
2022-06-25 02:17:00 【Cloudeeeee】
List of articles
【STL Source analysis 】STL Function and application of six components ( Catalog )
1. Containers (containers)
brief introduction : Various data structures , For storing data , Such as vector、list、deque( deque )、set、map wait
【STL Source analysis 】 Containers (undo)
2. Algorithm (algorithms)
brief introduction : Various STL Common algorithms provided , Such as sort、search、copy、erase wait . From an implementation point of view ,STL An algorithm is a method template (function template)
【STL Source analysis 】 Algorithm (undo)
3. iterator (iterators)
brief introduction : Iterators act as the glue between containers and algorithms , It's called “ Generic pointer ”. From an implementation point of view , An iterator is a kind of operator*,operator->,operator++,operator–, Class templates overloaded by pointer related operations (class template).
all STL Containers have their own iterators , Native pointers (nativa pointer) It's also an iterator .
What is? Native pointers ?
A native pointer is a normal pointer , The type name can be the base type , Such as int,double etc. , It can also be a self-defined Class class ; But if a class is overloaded * and -> Operator , It can be used like a pointer * and -> operation , It's not original . Such as iterator etc. .
【STL Source analysis 】 iterator (undo)
4. functor (functors)
brief introduction : A pseudo function behaves like a function , Can be used as a strategy for algorithms . From an implementation point of view , Functors are overloaded operator() Of class or class template. commonly Function pointers can be regarded as parody functions in a narrow sense .
【STL Source analysis 】 functor (undo)
5. adapter (adapters、 Adapter )
brief introduction : An adapter is something used to decorate a container or an interface to a functor or iterator , Such as STL Provided queue and stack, Although it looks like a container , But they can only be called a container adapter , Because their bottom layer relies on deque To achieve . change function Interfaces are called function adapter, Changing containers is called container adapter, change iterator Interfaces are called iterator adapter.
【STL Source analysis 】 adapter (undo)
6. Configurator (allocator)
brief introduction : Responsible for space allocation and management . From an implementation point of view , Configurator is an implementation of dynamic spatial configuration 、 Space releases class template.
【STL Source analysis 】 Configurator (ing)

边栏推荐
猜你喜欢

Application of TSDB in civil aircraft industry

【FPGA】串口以命令控制温度采集

【Proteus仿真】Arduino UNO+数码管显示4x4键盘矩阵按键

Please run IDA with elevated permissons for local debugging.

【STL源码剖析】配置器(待补充)

EasyCVR平台EHOME协议接入,视频播放出现断流是什么原因?

qt打包exe文件,解决“无法定位程序输入点_ZdaPvj于动态链接库Qt5Cored.dll”

Please run IDA with elevated permissons for local debugging.

The ecosystem of the yuan universe

The role of software security testing, how to find a software security testing company to issue a report?
随机推荐
业务与技术双向结合构建银行数据安全管理体系
[I.MX6UL] U-Boot移植(六) 网络驱动修改 LAN8720A
FTP协议讲解
商城项目 pc----商品详情页
中信证券手机开户是靠谱的吗?安全吗
常用的软件测试工具清单,请查收。
How to choose a regular and safe foreign exchange trading platform?
Sumati GameFi生态纵览,神奇世界中的元素设计
EasyCVR平台EHOME协议接入,视频播放出现断流是什么原因?
Viewing MySQL password on Linux_ MySQL forgets password "suggestions collection" under Linux
Software testing salary in first tier cities - are you dragging your feet
实战攻防演练中的四大特点
3年测试经验,连简历上真正需要什么都没搞明白,张口就要20k?
Intégration de la plate - forme de test continu open source de metersphere avec Alibaba Cloud Effect devops
LINQ 查询(3)
都2022年了,你还不了解什么是性能测试?
Please run IDA with elevated permissons for local debugging.
js正则匹配数字、大小写字母、下划线、中线和点[通俗易懂]
Qt中使用QDomDocument操作XML文件
折叠屏将成国产手机分食苹果市场的重要武器