cppreference.com -> C++ Lists

C++ Lists

Lists are sequences of elements stored in a linked list. Compared to vectors, they allow fast insertions and deletions, but slower random access.

assign() assign a sequence to the list
back() returns the last element
begin() returns an iterator to the beginning
clear() removes all elements
empty() true if the list is empty
end() returns an iterator to the end
erase() erase an element
front() returns the first element
get_allocator() returns the list's allocator
insert() insert elements into the list
max_size() returns the maximum number of elements the list can hold
merge() merge two lists
pop_back() removes the last element
pop_front() removes the first element
push_back() add an element to the end of the list
push_front() add an element to the front of the list
rbegin() returns a reverse iterator to the beginning of the list
remove() removes elements from the list
remove_if() removes elements conditionally
rend() returns a reverse iterator to the start of the list
resize() change the size of the list
reverse() reverse the list
size() the number the elements in the list
sort() sorts the list
splice() merge two lists
swap() exchange two lists
unique() removes duplicate elements