Standard C++ Library Reference ISO/IEC (VERSION3)
list::front
reference front();
const_reference front() const;
The member function returns a reference to the first element of the controlled sequence, which
must be non-empty.
list::get_allocator
Alloc get_allocator() const;
The member function returns the stored allocator object.
list::insert
iterator insert(iterator where, const Ty& val);
void insert(iterator where, size_type count, const Ty& val);
template<class InIt>
void insert(iterator where, InIt first, InIt last);
Each of the member functions inserts, before the element pointed to by where in the controlled
sequence, a sequence specified by the remaining operands. The first member function inserts a
single element with value val and returns an iterator that points to the newly inserted element.
The second member function inserts a repetition of count elements of value val.
If InIt is an integer type, the last member function behaves the same as insert(where,
(size_type)first, (Ty)last). Otherwise, the last member function inserts the
sequence [first, last), which must not overlap the initial controlled sequence.
Inserting N elements causes N constructor calls. No reallocation occurs, so no iterators or
references become invalid.
If an exception is thrown during the insertion of one or more elements, the container is left
unaltered and the exception is rethrown.
list::iterator
typedef T0 iterator;
The type describes an object that can serve as a bidirectional iterator for the controlled
sequence. It is described here as a synonym for the implementation-defined type T0.