容器分类:序列式容器和关联式容器

成员函数按类型有如下分类,不同容器对应的成员函数可查看这里。
序列式容器 | 成员函数 | 成员函数 | 关联式容器 | |
iterators | begin | begin | iterators | |
end | end | |||
rbegin | rbegin | |||
rend | rend | |||
const iterators | cbegin | cbegin | const iterators | |
cend | cend | |||
crbegin | crbegin | |||
crend | crend | |||
capacity | size | size | capacity | |
max_size | max_size | |||
empty | empty | |||
resize | ||||
shrink_to_fit | ||||
capacity | ||||
reserve | reserve | |||
element access | front | element access | ||
back | ||||
operator[] | operator[] | |||
at | at | |||
modifiers | assign | emplace_hint | modifiers | |
emplace | emplace | |||
insert | insert | |||
erase | erase | |||
emplace_back | ||||
push_back | ||||
pop_back | ||||
emplace_front | ||||
push_front | ||||
pop_front | ||||
clear | clear | |||
swap | swap | |||
list operations | splice | count | operations | |
remove | find | |||
remove_if | equal_range | |||
unique | lower_bound | |||
merge | upper_bound | |||
sort | ||||
reverse | ||||
observes | get_allocator | get_allocator | observers | |
data | key_comp | |||
value_comp | ||||
key_eq | ||||
hash_function | ||||
bucket | buckets | |||
bucket_count | ||||
bucket_size | ||||
max_bucket_count | ||||
rehash | hash policy | |||
load_factor | ||||
max_load_factor |
参考文献: