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

边栏推荐
- Resolution of cross reference in IDA
- Investigation on key threats of cloud computing applications in 2022
- jwt
- Do you know your ABC
- 左手梦想 右手责任 广汽本田不光关注销量 还有儿童安全
- Basic layout -qhboxlayout class, qvboxlayout class, qgridlayout class
- ida中交叉引用的解析
- vim的Dirvish中文文档
- Is the compass reliable? Is it safe to open a securities account?
- Of the seven levels of software testers, it is said that only 1% can achieve level 7
猜你喜欢

背了八股文,六月赢麻了……

jwt

EasyCVR国标协议接入的通道,在线通道部分播放异常是什么原因?

疫情防控,居家办公,网上授课之心得 | 社区征文

Sumati GameFi生态纵览,神奇世界中的元素设计

保险APP适老化服务评测分析2022第06期

When they are in private, they have a sense of propriety

Integration of metersphere open source continuous testing platform and Alibaba cloud cloud cloud efficient Devops

Chinese address and English address

qt打包exe文件,解决“无法定位程序输入点_ZdaPvj于动态链接库Qt5Cored.dll”
随机推荐
3年测试经验,连简历上真正需要什么都没搞明白,张口就要20k?
当一个接口出现异常时候,你是如何分析异常的?
软件测试人员的7个等级,据说只有1%的人能做到级别7
当他们在私域里,掌握了分寸感
June 24, 2022: golang multiple choice question, what does the following golang code output? A:1; B:3; C:4; D: Compilation failed. package main import ( “f
Intégration de la plate - forme de test continu open source de metersphere avec Alibaba Cloud Effect devops
FTP协议讲解
Kaggle 专利匹配比赛赛后总结
Basic layout -qhboxlayout class, qvboxlayout class, qgridlayout class
What is the reason for the disconnection of video playback due to the EHOME protocol access of easycvr platform?
Are programmers from Huawei, Alibaba and other large manufacturers really easy to find?
LINQ query (3)
Specific list of regular and safe domestic stock trading account opening
Redistemplate operates redis. This article is enough (I) [easy to understand]
Build and train your own dataset for pig face recognition
商城项目 pc----商品详情页
文件系统 -- 磁盘基础知识和FAT32文件系统详细介绍
Pit entry machine learning: I. Introduction
ida中交叉引用的解析
How do the TMUX color palette work?