at()
<class T, class Allocator = allocator>
list<T> l;
list<T> l(n, v);
list<customer> line2(line1);
list(start, end);
at()
front() and back()
size() and max_size() member functions
reserve() and capacity() member functions
d.push_back(v), d.pop_back(), d.push_front(v), and
d.pop_front() member functions
insert(v) and erase()
insert(i, v)
v immediately before (just to the left of)
the value referenced by the iterator i
v
insert(i, n, v)
n copies of the value v immediately before (just
to the left of) the value referenced by the iterator i
insert(i, start, end)
start,end
immediately before the value referenced by the iterator i
erase(i) - delete the value referenced by the iterator i
erase(s, e) - delete the values denoted by the iterator range
s,e
l1.splice(i, l2)
l2 immediately before the list
l1 value referenced by iterator i
l2 is empty after the splice - the elements are moved
l1 and l2 must be different
l1.splice(i1, l2, i2)
l2 value referenced by the iterator i2
immediately before the list l1 value referenced by iterator
i1
i2 is deleted from l2.
l1 and l2 need not be different
l1.splice(i1, l2, 2, e)
l2 values referenced by the iterator range (s,
e) i2 immediately before the list l1 value referenced by
iterator i1
(s, e) are deleted from l2.
l1 and l2 need not be different, but the iterator range
may not contain i1
l.remove(v) - delete from l all values equal to v; lists
only
+, -, +=, or -=
-
l.sort() - sort l
l.sort(c) - sort l using the comparison c
unique() - replace consecutive runs of a value with one copy of
the value
unique(p) - replace consecutive runs with a single value using
p to determine when adjacent values are equal
l1.merge(l2), l1.merge(l2, c) - merge l2 into l1,
using c; l2 is empty after
This page last modified on 4 July 2000.