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(hash_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 hash traits object Tr, which
includes both a two-operand function for imposing a strict weak ordering and a one-operand
hash function. 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 that can be independent of the number of
elements in the sequence (constant time). In the worst case, the number of operations is
proportional to the number of elements in the sequence (linear 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 hash traits object of type Tr. You
access this stored object by calling the member function key_comp(). Such a traits object