当前位置:网站首页>[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)

边栏推荐
- Android物联网应用程序开发(智慧园区)—— 设置传感器阈值对话框界面
- [live review] battle code pioneer phase 7: how third-party application developers contribute to open source
- linux上查看mysql的密码_Linux下MySQL忘记密码「建议收藏」
- Left hand dreams right hand responsibilities GAC Honda not only pays attention to sales but also children's safety
- TSDB在民机行业中的应用
- EasyCVR国标协议接入的通道,在线通道部分播放异常是什么原因?
- Post competition summary of kaggle patent matching competition
- Can automate - 10k, can automate - 20K, do you understand automated testing?
- 计算机三级(数据库)备考题目知识点总结
- Qt中使用QDomDocument操作XML文件
猜你喜欢

Can automate - 10k, can automate - 20K, do you understand automated testing?

ProcessOn制作ER过程(自定义)

MeterSphere開源持續測試平臺與阿裏雲雲效DevOps的集成

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

Constant current circuit composed of 2 NPN triodes

The ecosystem of the yuan universe

What are the reasons for the abnormal playback of the online channel of the channel accessed by easycvr national standard protocol?

内网学习笔记(7)

Test / development programmers, 30, do you feel confused? And where to go

背了八股文,六月赢麻了……
随机推荐
Chinese address and English address
Basic layout -qhboxlayout class, qvboxlayout class, qgridlayout class
beescms网站渗透测试和修复意见「建议收藏」
Chrysanthemum chain (winter vacation daily question 39)
02-Epicor二次开发常用代码
DDD概念复杂难懂,实际落地如何设计代码实现模型?
多模态情感识别_多模态融合的情感识别研究「建议收藏」
2022-06-24:golang选择题,以下golang代码输出什么?A:1;B:3;C:4;D:编译失败。 package main import ( “f
|How to analyze bugs? Professional summary and analysis
Intranet learning notes (7)
MOS管相关知识
jwt
mysql命令备份
测试/开发程序员,30而立,你是否觉得迷茫?又当何去何从......
转行软件测试2年了,给还在犹豫的女生一点建议
Smartctl opens the device and encounters permission denied problem troubleshooting process record
【移动端】手机界面的设计尺寸
MeterSphere開源持續測試平臺與阿裏雲雲效DevOps的集成
AI服装生成,帮你完成服装设计的最后一步
【Proteus仿真】Arduino UNO+数码管显示4x4键盘矩阵按键