Standard C++ Library Class Reference

Assignment. Replaces the contents of *this with a copy of the map x.
mapped_type& operator[] (const key_type& x);
If an element with the key x exists in the map, then a reference to its associated value will
be returned. Otherwise the pair x,T() will be inserted into the map and a reference to the
default object T() will be returned.
Allocator
allocator_type get_allocator () const;
Returns a copy of the allocator used by self for storage management.
Member Functions
void
clear ();
Erases all elements from the self.
size_type
count (const key_type& x) const;
Returns a 1 if a value with the key x exists in the map, otherwise returns a 0.
bool
empty() const;
Returns true if the map is empty, false otherwise.
pair<iterator, iterator>
equal_range (const key_type& x);
Returns the pair, (lower_bound(x), upper_bound(x)).
pair<const_iterator,const_iterator>
equal_range (const key_type& x) const;
Returns the pair, (lower_bound(x), upper_bound(x)).
iterator
erase (iterator position);
Deletes the map element pointed to by the iterator position. Returns an iterator pointing
to the element following the deleted element, or end() if the deleted item was the last one
in this list.
iterator
erase (iterator first, iterator last);
Providing the iterators first and last point to the same map and last is reachable from first,
all elements in the range (first, last) will be deleted from the map. Returns an iterator