Standard C++ Library Class Reference

pointing to the element following the last deleted element, or end() if there were no
elements after the deleted range.
size_type
erase (const key_type& x);
Deletes the element with the key value x from the map, if one exists. Returns 1 if x
existed in the map, 0 otherwise.
iterator
find (const key_type& x);
Searches the map for a pair with the key value x and returns an iterator to that pair if it is
found. If such a pair is not found the value end() is returned.
const_iterator find (const key_type& x) const;
Same as find above but returns a const_iterator.
pair<iterator, bool>
insert (const value_type& x);
iterator
insert (iterator position, const value_type& x);
If a value_type with the same key as x is not present in the map, then x is inserted into the
map. Otherwise, the pair is not inserted. A position may be supplied as a hint regarding
where to do the insertion. If the insertion may be done right after position then it takes
amortized constant time. Otherwise it will take O(log N) time.
template <class InputIterator>
void
insert (InputIterator first, InputIterator last);
Copies of each element in the range [first, last) which posess a unique key, one not
already in the map, will be inserted into the map. The iterators first and last must return
values of type pair<T1,T2>. This operation takes approximately O(N*log(size()+N))
time.
key_compare
key_comp () const;
Returns a function object capable of comparing key values using the comparison
operation, Compare, of the current map.
iterator
lower_bound (const key_type& x);
Returns a reference to the first entry with a key greater than or equal to x.
const_iterator
lower_bound (const key_type& x) const;
Same as lower_bound above but returns a const_iterator.