C++ reference containers
作者:互联网
description | iterators | capacity | element access | modifiers | operations | ||
array | 线性数组,固定长度 | begin/end | size | operator[] | fill | ||
rbegin/rend | max_size | at | swap | ||||
cbegin/cend | empty | front | |||||
crbegin/crend | back | ||||||
data | |||||||
vector | 线性数组,可变长度 | (constructor) operator= | begin/end | size | operator[] | assign | |
rbegin/rend | max_size | at | push_back/ pop_back | ||||
cbegin/cend | resize | front | push_front/pop_front | ||||
crbegin/crend | capacity | back | insert | ||||
empty | data | erase | |||||
reserve | swap | ||||||
shrink_to_fit | clear | ||||||
emplace | |||||||
emplace_back | |||||||
deque | //deck 双端队列, 长度可变, 线性 | (constructor) operator= | begin/end | size | operator[] | assign | |
rbegin/rend | max_size | at | push_back/ pop_back | ||||
cbegin/cend | resize | front | push_front/pop_front | ||||
crbegin/crend | empty | back | insert | ||||
shrink_to_fit | erase | ||||||
swap | |||||||
clear | |||||||
emplace | |||||||
emplace_front | |||||||
emplace_back | |||||||
queue | FIFO queue | (constructor) | empty | front/back | push/pop | ||
size | emplace | ||||||
swap | |||||||
priority_queue | (constructor) | empty | top | push/pop | |||
size | emplace | ||||||
swap | |||||||
stack | LIFO stack | (constructor) | empty | top | push/pop | ||
size | emplace | ||||||
swap | |||||||
forward_list | 单向链表,线性 | (constructor) operator= | before_begin | empty | front | assign | splice_after |
begin/end | max_size | emplace_front | remove | ||||
cbefore_begin | push_front/pop_front | remove_if | |||||
cbefore/cend | emplace_after | unique | |||||
insert_after/erase_after | merge | ||||||
swap | sort | ||||||
resize | reverse | ||||||
clear | |||||||
list | 双向链表, 线性 | (constructor) operator= | begin/end | empty | front | assign | splice |
rbegin/rend | size | back | emplace_front | remove | |||
cbegin/cend | max_size | push_front/pop_front | remove_if | ||||
crbegin/crend | emplace_back | unique | |||||
push_back/ pop_back | merge | ||||||
emplace | sort | ||||||
insert | reverse | ||||||
erase | |||||||
swap | |||||||
resize | |||||||
clear | |||||||
map | 二叉搜索树 | (constructor) operator= | begin/end | empty | operator[] | insert | find |
rbegin/rend | size | at | erase | count | |||
cbegin/cend | max_size | swap | lower_bound/upper_bound | ||||
crbegin/crend | clear | equal_range | |||||
empace | |||||||
emplace_hint | |||||||
key_comp | |||||||
value_comp | |||||||
multimap | 允许相同的键 | ||||||
unordered_map | (constructor) operator= | begin/end | operator[] | insert | find | ||
cbegin/cend | at | erase | count | ||||
swap | equal_range | ||||||
clear | |||||||
empace | |||||||
emplace_hint | |||||||
set | 二叉搜索树 | (constructor) operator= | begin/end | empty | insert | find | |
rbegin/rend | size | erase | count | ||||
cbegin/cend | max_size | swap | lower_bound/upper_bound | ||||
crbegin/crend | clear | equal_range | |||||
empace | |||||||
emplace_hint | |||||||
key_comp | |||||||
value_comp |
标签:begin,emplace,reference,back,C++,pop,constructor,operator,containers 来源: https://blog.csdn.net/tanguniang/article/details/116308470