.
. It is also a
.
. This class is an SGI extension; it is not part
of the C++ standard.
None.
|
Member
|
Where defined
|
Description
|
|
key_type
|
Associative Container
|
The hash_map's key type, Key.
|
|
data_type
|
Pair Associative Container
|
The type of object associated with the keys.
|
|
value_type
|
Pair Associative Container
|
The type of object, pair<const key_type, data_type>, stored in the hash_map.
|
|
hasher
|
Hashed Associative Container
|
The hash_map's hash function.
|
|
key_equal
|
Hashed Associative Container
|
Function object that compares keys for equality.
|
|
pointer
|
Container
|
Pointer to T.
|
|
reference
|
Container
|
Reference to T
|
|
const_reference
|
Container
|
Const reference to T
|
|
size_type
|
Container
|
An unsigned integral type.
|
|
difference_type
|
Container
|
A signed integral type.
|
|
iterator
|
Container
|
Iterator used to iterate through a hash_map. [1]
|
|
const_iterator
|
Container
|
Const iterator used to iterate through a hash_map.
|
|
iterator begin()
|
Container
|
Returns an iterator pointing to the beginning of the hash_map.
|
|
iterator end()
|
Container
|
Returns an iterator pointing to the end of the hash_map.
|
|
const_iterator begin() const
|
Container
|
Returns an const_iterator pointing to the beginning of the hash_map.
|
|
const_iterator end() const
|
Container
|
Returns an const_iterator pointing to the end of the hash_map.
|
|
size_type size() const
|
Container
|
Returns the size of the hash_map.
|
|
size_type max_size() const
|
Container
|
Returns the largest possible size of the hash_map.
|
|
bool empty() const
|
Container
|
true if the hash_map's size is 0.
|
|
size_type bucket_count() const
|
Hashed Associative Container
|
Returns the number of buckets used by the hash_map.
|
|
void resize(size_type n)
|
Hashed Associative Container
|
Increases the bucket count to at least n.
|
|
hasher hash_funct() const
|
Hashed Associative Container
|
Returns the hasher object used by the hash_map.
|
|
key_equal key_eq() const
|
Hashed Associative Container
|
Returns the key_equal object used by the hash_map.
|
|
hash_map()
|
Container
|
Creates an empty hash_map.
|
|
hash_map(size_type n)
|
Hashed Associative Container
|
Creates an empty hash_map with at least n buckets.
|
hash_map(size_type n,
const hasher& h)
|
Hashed Associative Container
|
Creates an empty hash_map with at least n buckets, using h
as the hash function.
|
hash_map(size_type n,
const hasher& h,
const key_equal& k)
|
Hashed Associative Container
|
Creates an empty hash_map with at least n buckets, using h
as the hash function and k as the key equal function.
|
template <class InputIterator>
hash_map(InputIterator f, InputIterator l)
[2]
|
Unique Hashed Associative Container
|
Creates a hash_map with a copy of a range.
|
template <class InputIterator>
hash_map(InputIterator f, InputIterator l,
size_type n)
[2]
|
Unique Hashed Associative Container
|
Creates a hash_map with a copy of a range and a bucket count of at
least n.
|
template <class InputIterator>
hash_map(InputIterator f, InputIterator l,
size_type n, const hasher& h)
[2]
|
Unique Hashed Associative Container
|
Creates a hash_map with a copy of a range and a bucket count of at
least n, using h as the hash function.
|
template <class InputIterator>
hash_map(InputIterator f, InputIterator l,
size_type n, const hasher& h,
const key_equal& k)
[2]
|
Unique Hashed Associative Container
|
Creates a hash_map with a copy of a range and a bucket count of at
least n, using h as the hash function and k as the
key equal function.
|
|
hash_map(const hash_map&)
|
Container
|
The copy constructor.
|
|
hash_map& operator=(const hash_map&)
|
Container
|
The assignment operator
|
|
void swap(hash_map&)
|
Container
|
Swaps the contents of two hash_maps.
|
pair<iterator, bool>
insert(const value_type& x)
|
Unique Associative Container
|
Inserts x into the hash_map.
|
template <class InputIterator>
void insert(InputIterator f, InputIterator l)
[2]
|
Unique Associative Container
|
Inserts a range into the hash_map.
|
|
void erase(iterator pos)
|
Associative Container
|
Erases the element pointed to by pos.
|
|
size_type erase(const key_type& k)
|
Associative Container
|
Erases the element whose key is k.
|
|
void erase(iterator first, iterator last)
|
Associative Container
|
Erases all elements in a range.
|
|
void clear()
|
Associative Container
|
Erases all of the elements.
|
|
const_iterator find(const key_type& k) const
|
Associative Container
|
Finds an element whose key is k.
|
|
iterator find(const key_type& k)
|
Associative Container
|
Finds an element whose key is k.
|
|
size_type count(const key_type& k) const
|
Unique Associative Container
|
Counts the number of elements whose key is k.
|
pair<const_iterator, const_iterator>
equal_range(const key_type& k) const
|
Associative Container
|
Finds a range containing all elements whose key is k.
|
pair<iterator, iterator>
equal_range(const key_type& k)
|
Associative Container
|
Finds a range containing all elements whose key is k.
|
data_type&
operator[](const key_type& k) [3]
|
hash_map
|
See below.
|
bool operator==(const hash_map&,
const hash_map&)
|
Hashed Associative Container
|
Tests two hash_maps for equality. This is a global function,
not a member function.
|
.