C++ Reference Material
The STL Sequential Containers and Container Adaptors,
and their Member Functions
member function |
vector |
deque |
list |
stack |
queue |
priority_queue |
at(index) | Y | Y | N | N | N | N |
operator [ ] | Y | Y | N | N | N | N |
=, ==, !=, <, <=, >, >= | Y | Y | Y | Y | Y | = only |
empty() | Y | Y | Y | Y | Y | Y |
size() | Y | Y | Y | Y | Y | Y |
max_size() | Y | Y | Y | N | N | N |
swap(otherLikeContainer) | Y | Y | Y | N | N | N |
begin(), end() | Y | Y | Y | N | N | N |
rbegin(), rend() | Y | Y | Y | N | N | N |
insert(iter, val)
insert(iter, num, val) insert(iter, start, end) |
Y | Y | Y | N | N | N |
erase(iter)
erase(start, end) |
Y | Y | Y | N | N | N |
clear() | Y | Y | Y | N | N | N |
assign(start, end)
assign(num, val) |
Y | Y | Y | N | N | N |
front() | Y | Y | Y | N | Y | N |
back() | Y | Y | Y | N | Y | N |
push_back(val) | Y | Y | Y | N | N | N |
pop_back() | Y | Y | Y | N | N | N |
resize(num)
resize(num, val) |
Y | Y | Y | N | N | N |
reserve(num) | Y | N | N | N | N | N |
capacity() | Y | N | N | N | N | N |
merge(otherList) | N | N | Y | N | N | N |
remove(val)
remove_if(predicate) |
N | N | Y | N | N | N |
reverse(start, end) | N | N | Y | N | N | N |
sort() | N | N | Y | N | N | N |
splice(iter, otherList) | N | N | Y | N | N | N |
unique() | N | N | Y | N | N | N |
push_front(val) | N | Y | Y | N | N | N |
pop_front() | N | Y | Y | N | N | N |
push(val) | N | N | N | Y | Y | Y |
pop() | N | N | N | Y | Y | Y |
top() | N | N | N | Y | N | Y |