Standard C++ Library Reference ISO/IEC (VERSION3)

const_reverse_iterator rend() const;
size_type size() const;
size_type max_size() const;
bool empty() const;
Alloc get_allocator() const;
mapped_type operator[](const Key& keyval);
pair<iterator, bool> insert(const value_type& val);
iterator insert(iterator where, const value_type& val);
template<class InIt>
void insert(InIt first, InIt last);
iterator erase(iterator where);
iterator erase(iterator first, iterator last);
size_type erase(const Key& keyval);
void clear();
void swap(map& right);
key_compare key_comp() const;
value_compare value_comp() const;
iterator find(const Key& keyval);
const_iterator find(const Key& keyval) const;
size_type count(const Key& keyval) const;
iterator lower_bound(const Key& keyval);
const_iterator lower_bound(const Key& keyval) const;
iterator upper_bound(const Key& keyval);
const_iterator upper_bound(const Key& keyval) const;
pair<iterator, iterator> equal_range(const Key& keyval);
pair<const_iterator, const_iterator>
equal_range(const Key& keyval) const;
};
The template class describes an object that controls a varying-length sequence of elements of
type pair<const Key, Ty>. The sequence is ordered by the predicate Pr. The first
element of each pair is the sort key and the second is its associated value. The sequence is
represented in a way that permits lookup, insertion, and removal of an arbitrary element with a
number of operations proportional to the logarithm of the number of elements in the sequence
(logarithmic time). Moreover, inserting an element invalidates no iterators, and removing an
element invalidates only those iterators which point at the removed element.
The object orders the sequence it controls by calling a stored function object of type Pr. You
access this stored object by calling the member function key_comp(). Such a function object
must impose a strict weak ordering on sort keys of type Key. For any element X that precedes Y
in the sequence, key_comp()(Y.first, X.first) is false. (For the default function
object less<Key>, sort keys never decrease in value.) Unlike template class multimap, an