Standard Library ContainersStandard Containersstd::
Containers
|
fixed-size contiguous array |
|
dynamic contiguous array; armortized O(1) growth strategy; |
|
double-ended queue; fast insert/erase at both ends |
|
doubly-linked list; O(1) insert, erase & splicing; in practice often slower than vector |
|
singly-linked list; O(1) insert, erase & splicing; needs less memory than |
|
|
|
|
|
|
|
|
Containers that allow non-unique keys:
multiset
multimap
unordered_multiset
unordered_multimap
|
|
|
|
|
|
|
|
|
|
Views
- lightweight (= cheap to copy, can be passed by value)
- non-owning (= not responsible for allocating or deleting memory)