1. 写在最前面

这将是博主的第一篇技术博客,思考再三决定从翻译开始。这将是一个系列的博客,由不同的章节组成,章节之间由超链接联系,开发过程将使用增量式开发,每次完成一个章节。本篇是本系列的总册,提供了所有子章节的超链接,另外所有的子章节也都将提供链接返回到本篇。
 

2. 本系列的目录结构

第三章 <forward_list>
第四章 <list>
第五章 <map>
第六章 <queue>
第七章 <set>
第八章 <stack>
第九章 <unordered_map>
第十章 <unordered_set>
第十一章 <vector>
 

3. 专有名词的翻译规范

专用名词的翻译在不同的资料中会有较大的差异,本文遵循如下的翻译规范:
allocator 分配器
array 数组容器(当主语代表数组容器时)/数组(当主语代表普通数组时)
deque 双向队列
forward list 单链表
list 链表
map 映射
queue 队列
set 集合
stack 栈
unordered map 无序映射
unordered set 无序集合
vector 动态数组
priority queue 优先队列
 
 

4. 本系列的原文

5. 标准容器

容器,正如其字面意思,是存储了一组对象的数据集合(这里的每个对象都是这个容器的元素),当然了这里的容器本身也是一个对象。所有的容器都被设计成为模板类,这样一来容器可存储的元素类型就具有非常大的灵活性。

容器负责管理自身用以存储元素的物理空间,并且提供了成员函数来访问这些元素 -- 有直接访问的方式也有通过迭代器(具有类似指针的属性)访问的方式。

容器实现了程序设计中非常常见的结构:动态数组(vector),队列(queue),栈(stack),堆(priority_queue),链表(list),树(set),关联数组(map)...

许多不同的容器具有相同的成员函数,并且共享一些功能。在决定使用哪一种具体的容器时,不仅仅需要考虑到容器提供的功能,同时也要考虑到访问其成员的效率(复杂度)。尤其是对于序列容器,这些容器在插入/删除元素与访问元素的复杂度之间有着不同的权衡。

stack, queue以及priority_queue被实现为容器适配器。容器适配器并不是完整的容器,而是一个提供了某些特定接口的类,容器适配器将一个容器封装起来,然后就可以通过容器适配器提供的这些接口来访问这个容器的元素。

6. 容器模板类

序列容器

array (c++11 only) 数组类 (模板类)
vector 动态数组 (模板类)
deque 双端队列 (模板类)
forward_list 单链表 (模板类)
list (c++11 only) 链表 (模板类)

容器适配器

stack 先入后出栈 (模板类)
queue 先入先出队列 (模板类)
priority_queue 优先队列 (模板类)

关联容器

set 集合 (模板类)
multiset 多重集合 (模板类)
map 映射 (模板类)
multimap 多重影射 (模板类)

无序关联容器

unordered_set 无序集合 (模板类)
unordered_multiset 无序多重集合 (模板类)
unordered_map 无序映射 (模板类)
unordered_multimap 无序多重映射 (模板类)

7. 成员列表

序列容器
Headers <array> <vector> <deque> <forward_list> <list>
Members array vector deque forward_list list
  constructor implicit vector deque forward_list list
destructor implicit ~vector ~deque ~forward_list ~list
operator= implicit operator= operator= operator= operator=
iterators begin begin begin begin begin
before_begin
begin
end end end end end end
rbegin rbegin rbegin rbegin   rbegin
rend rend rend rend   rend
const iterators begin cbegin cbegin cbegin cbegin
cbefore_begin
cbegin
cend cend cend cend cend cend
crbegin crbegin crbegin crbegin   crbegin
crend crend crend crend   crend
capacity size size size size   size
max_size max_size max_size max_size max_size max_size
empty empty empty empty empty empty
resize   resize resize resize resize
shrink_to_fit   shrink_to_fit shrink_to_fit    
capacity   capacity      
reserve   reserve      
element access front front front front front front
back back back back   back
operator[] operator[] operator[] operator[]    
at at at at    
modifiers assign   assign assign assign assign
emplace   emplace emplace emplace_after emplace
insert   insert insert insert_after insert
erase   erase erase erase_after erase
emplace_back   emplace_back emplace_back   emplace_back
push_back   push_back push_back   push_back
pop_back   pop_back pop_back   pop_back
emplace_front     emplace_front emplace_front emplace_front
push_front     push_front push_front push_front
pop_front     pop_front pop_front pop_front
clear   clear clear clear clear
swap swap swap swap swap swap
list operations splice       splice_after splice
remove       remove remove
remove_if       remove_if remove_if
unique       unique unique
merge       merge merge
sort       sort sort
reverse       reverse reverse
observers get_allocator   get_allocator get_allocator get_allocator get_allocator
data data data      

关联容器

Headers <set> <map> <unordered_set> <unordered_map>
Members set multiset map multimap unordered_set unordered_multiset unordered_map unordered_multimap
  constructor set multiset map multimap unordered_set unordered_multiset unordered_map unordered_multimap
destructor ~set ~multiset ~map ~multimap ~unordered_set ~unordered_multiset ~unordered_map ~unordered_multimap
assignment operator= operator= operator= operator= operator= operator= operator= operator=
iterators begin begin begin begin begin begin begin begin begin
end end end end end end end end end
rbegin rbegin rbegin rbegin rbegin        
rend rend rend rend rend        
const iterators cbegin cbegin cbegin cbegin cbegin cbegin cbegin cbegin cbegin
cend cend cend cend cend cend cend cend cend
crbegin crbegin crbegin crbegin crbegin        
crend crend crend crend crend        
capacity size size size size size size size size size
max_size max_size max_size max_size max_size max_size max_size max_size max_size
empty empty empty empty empty empty empty empty empty
reserve         reserve reserve reserve reserve
element access at     at       at  
operator[]     operator[]       operator[]  
modifiers emplace emplace emplace emplace emplace emplace emplace emplace emplace
emplace_hint emplace_hint emplace_hint emplace_hint emplace_hint emplace_hint emplace_hint emplace_hint emplace_hint
insert insert insert insert insert insert insert insert insert
erase erase erase erase erase erase erase erase erase
clear clear clear clear clear clear clear clear clear
swap swap swap swap swap swap swap swap swap
operations count count count count count count count count count
find find find find find find find find find
equal_range equal_range equal_range equal_range equal_range equal_range equal_range equal_range equal_range
lower_bound lower_bound lower_bound lower_bound lower_bound        
upper_bound upper_bound upper_bound upper_bound upper_bound        
observers get_allocator get_allocator get_allocator get_allocator get_allocator get_allocator get_allocator get_allocator get_allocator
key_comp key_comp key_comp key_comp key_comp        
value_comp value_comp value_comp value_comp value_comp        
key_eq         key_eq key_eq key_eq key_eq
hash_function         hash_function hash_function hash_function hash_function
buckets bucket         bucket bucket bucket bucket
bucket_count         bucket_count bucket_count bucket_count bucket_count
bucket_size         bucket_size bucket_size bucket_size bucket_size
max_bucket_count         max_bucket_count max_bucket_count max_bucket_count max_bucket_count
hash policy rehash         rehash rehash rehash rehash
load_factor         load_factor load_factor load_factor load_factor
max_load_factor         max_load_factor max_load_factor max_load_factor max_load_factor
 

[翻译] C++ STL容器参考手册 (总册)的更多相关文章

  1. [翻译] C++ STL容器参考手册(第一章 <array>)

    返回总册 本章节原文:http://www.cplusplus.com/reference/array/array/ 1. std::array (C++11支持) template < cla ...

  2. [翻译] C++ STL容器参考手册(第二章 <deque>)

    返回总册 本章节原文:http://www.cplusplus.com/reference/deque/deque/ 1. std::deque template < class T, clas ...

  3. Lua 5.2 中文参考手册

    闲来无事,发现Lua更新到了5.2.2,参考手册也更到了5.2,在网上发现只有云风翻译的5.1版,花了几天时间翻译了一些. 参考手册有点长,又要随时修改,所以在github上建了项目,有需要的朋友可以 ...

  4. Spring Security 5.0.x 参考手册 【翻译自官方GIT-2018.06.12】

    源码请移步至:https://github.com/aquariuspj/spring-security/tree/translator/docs/manual/src/docs/asciidoc 版 ...

  5. LLVM language 参考手册 翻译停止相关

    再翻译LLVM language 参考手册的时候,个人感觉很多东西都不是很懂,因此打算学习完编译原理后再去继续研究翻译,多有不便望见谅

  6. PJSUA2开发文档--第十二章 PJSUA2 API 参考手册

    12 PJSUA2 API 参考手册 12.1 endpoint.hpp PJSUA2基本代理操作.  namespace pj PJSUA2 API在pj命名空间内. 12.1.1 class En ...

  7. Spring4参考手册中文版

    Spring4参考手册中文版 前言 https://github.com/b2gats/stone-docs/blob/master/spring-4-beans.md Part III. 核心技术 ...

  8. RichEdit控件 SDK 参考手册

    RichEdit控件 SDK 参考手册 摘要: 本文对Rich Edit控件底层消息机制进行了讲解,以期读者对Windows平台下的Rich Edit控件有一个更深入的认识,同时对于使用Win32 S ...

  9. Dubbo -- 系统学习 笔记 -- 配置参考手册

    Dubbo -- 系统学习 笔记 -- 目录 配置参考手册 <dubbo:service/> <dubbo:reference/> <dubbo:protocol/> ...

随机推荐

  1. nginx入门手册(一)

    1.nginx进程: nginx会启动多个进程: 一个主进程Master. 几个工作进程worker. 缓存加载器进程 缓存管理器进程 master主要工作: 1. 读取并验正配置信息: 2. 创建. ...

  2. Microsoft Visual C++ 2005 SP1 Redistributable 安装错误

    1.在安装Microsoft Visual C++ 2005 SP1 Redistributable时报错:Command line option syntax error.Type Command ...

  3. jQuery 幻灯片 ----摘录

    Cloud Carousel (演示 | 下载) ShineTime (演示 | 下载) Nivo Slider (演示 | 下载) Interactive Photo Desk (演示 | 下载) ...

  4. ubuntu下安装phpstrom

    安装JAVA环境包1,下载 java 的 JDK 包,去官网下载(http://www.oracle.com/technetwork/java/javase/downloads/index.html) ...

  5. 关于split splice slice 的一些事

    学的知识很久不用总会忘记,更何况这三个的拼写都差不多,在这里特意写下自己的一些见解,以便以后可以更好地理解. slice  : 定义:接收一个或两个参数,它可以创建一个由当前数组中的一项或多项组成的新 ...

  6. ios如何判断键盘是否已经显示

    ios如何判断键盘是否已经显示   在群里看到有人问:ios如何判断键盘已经显示在界面上. 其实这个解决很简单: 写一个单例来管理键盘的状态. 这个单例在初始化方法init种监听2个事件,分别是 UI ...

  7. 修改textField的placeholder的字体颜色、大小

    textField.placeholder = @"username is in here!"; [textField setValue:[UIColor redColor] fo ...

  8. android特效

    http://houxiyang.com/archives/89/ http://blog.csdn.net/hjj0212/article/details/8535817 http://www.li ...

  9. LeetCode_Combination Sum

    Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C wher ...

  10. resultMap之collection聚集

    <select id="getCarsWithCollection" resultMap="superCarResult"> select c1.c ...