BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR > Class Template Reference

#include <bslstl_unorderedmultimap.h>

Public Types

typedef KEY key_type
 
typedef VALUE mapped_type
 
typedef bsl::pair< const KEY, VALUE > value_type
 
typedef HASH hasher
 
typedef EQUAL key_equal
 
typedef ALLOCATOR allocator_type
 
typedef value_typereference
 
typedef const value_typeconst_reference
 
typedef AllocatorTraits::size_type size_type
 
typedef AllocatorTraits::difference_type difference_type
 
typedef AllocatorTraits::pointer pointer
 
typedef AllocatorTraits::const_pointer const_pointer
 
typedef ::BloombergLP::bslstl::HashTableIterator< value_type, difference_typeiterator
 
typedef ::BloombergLP::bslstl::HashTableIterator< const value_type, difference_typeconst_iterator
 
typedef ::BloombergLP::bslstl::HashTableBucketIterator< value_type, difference_typelocal_iterator
 
typedef ::BloombergLP::bslstl::HashTableBucketIterator< const value_type, difference_typeconst_local_iterator
 

Public Member Functions

 unordered_multimap ()
 
 unordered_multimap (size_type initialNumBuckets, const HASH &hashFunction=HASH(), const EQUAL &keyEqual=EQUAL(), const ALLOCATOR &basicAllocator=ALLOCATOR())
 
 unordered_multimap (size_type initialNumBuckets, const HASH &hashFunction, const ALLOCATOR &basicAllocator)
 
 unordered_multimap (size_type initialNumBuckets, const ALLOCATOR &basicAllocator)
 
 unordered_multimap (const ALLOCATOR &basicAllocator)
 
 unordered_multimap (const unordered_multimap &original)
 
 unordered_multimap (BloombergLP::bslmf::MovableRef< unordered_multimap > original)
 
 unordered_multimap (const unordered_multimap &original, const typename type_identity< ALLOCATOR >::type &basicAllocator)
 
 unordered_multimap (BloombergLP::bslmf::MovableRef< unordered_multimap > original, const typename type_identity< ALLOCATOR >::type &basicAllocator)
 
template<class INPUT_ITERATOR >
 unordered_multimap (INPUT_ITERATOR first, INPUT_ITERATOR last, size_type initialNumBuckets=0, const HASH &hashFunction=HASH(), const EQUAL &keyEqual=EQUAL(), const ALLOCATOR &basicAllocator=ALLOCATOR())
 
template<class INPUT_ITERATOR >
 unordered_multimap (INPUT_ITERATOR first, INPUT_ITERATOR last, size_type initialNumBuckets, const HASH &hashFunction, const ALLOCATOR &basicAllocator)
 
template<class INPUT_ITERATOR >
 unordered_multimap (INPUT_ITERATOR first, INPUT_ITERATOR last, size_type initialNumBuckets, const ALLOCATOR &basicAllocator)
 
template<class INPUT_ITERATOR >
 unordered_multimap (INPUT_ITERATOR first, INPUT_ITERATOR last, const ALLOCATOR &basicAllocator)
 
 ~unordered_multimap ()
 Destroy this object.
 
unordered_multimapoperator= (const unordered_multimap &rhs)
 
unordered_multimap &operator=(BloombergLP::bslmf::MovableRef< unordered_multimap > rhs) BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(AllocatorTraits iterator begin () BSLS_KEYWORD_NOEXCEPT
 
iterator end () BSLS_KEYWORD_NOEXCEPT
 
local_iterator begin (size_type index)
 
local_iterator end (size_type index)
 
void clear () BSLS_KEYWORD_NOEXCEPT
 
template<class LOOKUP_KEY >
enable_if< BloombergLP::bslmf::IsTransparentPredicate< HASH, LOOKUP_KEY >::value &&BloombergLP::bslmf::IsTransparentPredicate< EQUAL, LOOKUP_KEY >::value, pair< iterator, iterator > >::type equal_range (const LOOKUP_KEY &key)
 
pair< iterator, iteratorequal_range (const key_type &key)
 
size_type erase (const key_type &key)
 
iterator erase (const_iterator position)
 
iterator erase (iterator position)
 
iterator erase (const_iterator first, const_iterator last)
 
template<class LOOKUP_KEY >
enable_if< BloombergLP::bslmf::IsTransparentPredicate< HASH, LOOKUP_KEY >::value &&BloombergLP::bslmf::IsTransparentPredicate< EQUAL, LOOKUP_KEY >::value, iterator >::type find (const LOOKUP_KEY &key)
 
iterator find (const key_type &key)
 
iterator insert (const value_type &value)
 
template<class ALT_VALUE_TYPE >
enable_if< is_convertible< ALT_VALUE_TYPE, value_type >::value, iterator >::type insert (BSLS_COMPILERFEATURES_FORWARD_REF(ALT_VALUE_TYPE) value)
 
iterator insert (const_iterator hint, const value_type &value)
 
template<class ALT_VALUE_TYPE >
enable_if< is_convertible< ALT_VALUE_TYPE, value_type >::value, iterator >::type insert (const_iterator hint, BSLS_COMPILERFEATURES_FORWARD_REF(ALT_VALUE_TYPE) value)
 
template<class INPUT_ITERATOR >
void insert (INPUT_ITERATOR first, INPUT_ITERATOR last)
 
template<class... Args>
iterator emplace (Args &&... args)
 
template<class... Args>
iterator emplace_hint (const_iterator hint, Args &&... args)
 
void max_load_factor (float newLoadFactor)
 
void rehash (size_type numBuckets)
 
void reserve (size_type numElements)
 
const_iterator begin () const BSLS_KEYWORD_NOEXCEPT
 
const_iterator cbegin () const BSLS_KEYWORD_NOEXCEPT
 
const_iterator end () const BSLS_KEYWORD_NOEXCEPT
 
const_iterator cend () const BSLS_KEYWORD_NOEXCEPT
 
bool contains (const key_type &key) const
 
template<class LOOKUP_KEY >
enable_if< BloombergLP::bslmf::IsTransparentPredicate< HASH, LOOKUP_KEY >::value &&BloombergLP::bslmf::IsTransparentPredicate< EQUAL, LOOKUP_KEY >::value, bool >::type contains (const LOOKUP_KEY &key) const
 
bool empty () const BSLS_KEYWORD_NOEXCEPT
 
size_type size () const BSLS_KEYWORD_NOEXCEPT
 Return the number of elements in this unordered multimap.
 
size_type max_size () const BSLS_KEYWORD_NOEXCEPT
 
EQUAL key_eq () const
 
HASH hash_function () const
 
template<class LOOKUP_KEY >
enable_if< BloombergLP::bslmf::IsTransparentPredicate< HASH, LOOKUP_KEY >::value &&BloombergLP::bslmf::IsTransparentPredicate< EQUAL, LOOKUP_KEY >::value, const_iterator >::type find (const LOOKUP_KEY &key) const
 
const_iterator find (const key_type &key) const
 
template<class LOOKUP_KEY >
enable_if< BloombergLP::bslmf::IsTransparentPredicate< HASH, LOOKUP_KEY >::value &&BloombergLP::bslmf::IsTransparentPredicate< EQUAL, LOOKUP_KEY >::value, size_type >::type count (const LOOKUP_KEY &key) const
 
size_type count (const key_type &key) const
 
template<class LOOKUP_KEY >
enable_if< BloombergLP::bslmf::IsTransparentPredicate< HASH, LOOKUP_KEY >::value &&BloombergLP::bslmf::IsTransparentPredicate< EQUAL, LOOKUP_KEY >::value, pair< const_iterator, const_iterator > >::type equal_range (const LOOKUP_KEY &key) const
 
pair< const_iterator, const_iteratorequal_range (const key_type &key) const
 
const_local_iterator begin (size_type index) const
 
const_local_iterator cbegin (size_type index) const
 
const_local_iterator end (size_type index) const
 
const_local_iterator cend (size_type index) const
 
size_type bucket (const key_type &key) const
 
size_type bucket_count () const BSLS_KEYWORD_NOEXCEPT
 
size_type max_bucket_count () const BSLS_KEYWORD_NOEXCEPT
 
size_type bucket_size (size_type index) const
 
float load_factor () const BSLS_KEYWORD_NOEXCEPT
 
float max_load_factor () const BSLS_KEYWORD_NOEXCEPT
 

Public Attributes

void swap(unordered_multimap &other) BSLS_KEYWORD_NOEXCEPT_SPECIFICATION(AllocatorTraits allocator_type get_allocator () const BSLS_KEYWORD_NOEXCEPT
 

Friends

template<class KEY2 , class VALUE2 , class HASH2 , class EQUAL2 , class ALLOCATOR2 >
bool operator== (const unordered_multimap< KEY2, VALUE2, HASH2, EQUAL2, ALLOCATOR2 > &, const unordered_multimap< KEY2, VALUE2, HASH2, EQUAL2, ALLOCATOR2 > &)
 

Detailed Description

template<class KEY, class VALUE, class HASH = bsl::hash<KEY>, class EQUAL = bsl::equal_to<KEY>, class ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE> >>
class bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >

This class template implements a value-semantic container type holding a collection of (possibly equivalent) keys (of the template parameter type KEY), each mapped to their associated values (of another template parameter type VALUE).

This class:

  • supports a complete set of value-semantic operations
    • except for BDEX serialization
  • is exception-neutral (agnostic except for the at method)
  • is alias-safe
  • is const thread-safe For terminology see bsldoc_glossary .

See bslstl_unorderedmultimap

Member Typedef Documentation

◆ allocator_type

template<class KEY , class VALUE , class HASH = bsl::hash<KEY>, class EQUAL = bsl::equal_to<KEY>, class ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE> >>
typedef ALLOCATOR bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::allocator_type

◆ const_iterator

template<class KEY , class VALUE , class HASH = bsl::hash<KEY>, class EQUAL = bsl::equal_to<KEY>, class ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE> >>
typedef ::BloombergLP::bslstl::HashTableIterator< const value_type, difference_type> bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::const_iterator

◆ const_local_iterator

template<class KEY , class VALUE , class HASH = bsl::hash<KEY>, class EQUAL = bsl::equal_to<KEY>, class ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE> >>
typedef ::BloombergLP::bslstl::HashTableBucketIterator< const value_type, difference_type> bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::const_local_iterator

◆ const_pointer

template<class KEY , class VALUE , class HASH = bsl::hash<KEY>, class EQUAL = bsl::equal_to<KEY>, class ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE> >>
typedef AllocatorTraits::const_pointer bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::const_pointer

◆ const_reference

template<class KEY , class VALUE , class HASH = bsl::hash<KEY>, class EQUAL = bsl::equal_to<KEY>, class ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE> >>
typedef const value_type& bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::const_reference

◆ difference_type

template<class KEY , class VALUE , class HASH = bsl::hash<KEY>, class EQUAL = bsl::equal_to<KEY>, class ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE> >>
typedef AllocatorTraits::difference_type bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::difference_type

◆ hasher

template<class KEY , class VALUE , class HASH = bsl::hash<KEY>, class EQUAL = bsl::equal_to<KEY>, class ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE> >>
typedef HASH bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::hasher

◆ iterator

template<class KEY , class VALUE , class HASH = bsl::hash<KEY>, class EQUAL = bsl::equal_to<KEY>, class ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE> >>
typedef ::BloombergLP::bslstl::HashTableIterator< value_type, difference_type> bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::iterator

◆ key_equal

template<class KEY , class VALUE , class HASH = bsl::hash<KEY>, class EQUAL = bsl::equal_to<KEY>, class ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE> >>
typedef EQUAL bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::key_equal

◆ key_type

template<class KEY , class VALUE , class HASH = bsl::hash<KEY>, class EQUAL = bsl::equal_to<KEY>, class ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE> >>
typedef KEY bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::key_type

◆ local_iterator

template<class KEY , class VALUE , class HASH = bsl::hash<KEY>, class EQUAL = bsl::equal_to<KEY>, class ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE> >>
typedef ::BloombergLP::bslstl::HashTableBucketIterator< value_type, difference_type> bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::local_iterator

◆ mapped_type

template<class KEY , class VALUE , class HASH = bsl::hash<KEY>, class EQUAL = bsl::equal_to<KEY>, class ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE> >>
typedef VALUE bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::mapped_type

◆ pointer

template<class KEY , class VALUE , class HASH = bsl::hash<KEY>, class EQUAL = bsl::equal_to<KEY>, class ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE> >>
typedef AllocatorTraits::pointer bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::pointer

◆ reference

template<class KEY , class VALUE , class HASH = bsl::hash<KEY>, class EQUAL = bsl::equal_to<KEY>, class ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE> >>
typedef value_type& bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::reference

◆ size_type

template<class KEY , class VALUE , class HASH = bsl::hash<KEY>, class EQUAL = bsl::equal_to<KEY>, class ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE> >>
typedef AllocatorTraits::size_type bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::size_type

◆ value_type

template<class KEY , class VALUE , class HASH = bsl::hash<KEY>, class EQUAL = bsl::equal_to<KEY>, class ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE> >>
typedef bsl::pair<const KEY, VALUE> bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::value_type

Constructor & Destructor Documentation

◆ unordered_multimap() [1/13]

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::unordered_multimap ( )
inline

◆ unordered_multimap() [2/13]

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::unordered_multimap ( size_type  initialNumBuckets,
const HASH &  hashFunction = HASH(),
const EQUAL &  keyEqual = EQUAL(),
const ALLOCATOR &  basicAllocator = ALLOCATOR() 
)
inlineexplicit

◆ unordered_multimap() [3/13]

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::unordered_multimap ( size_type  initialNumBuckets,
const HASH &  hashFunction,
const ALLOCATOR &  basicAllocator 
)
inline

◆ unordered_multimap() [4/13]

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::unordered_multimap ( size_type  initialNumBuckets,
const ALLOCATOR &  basicAllocator 
)
inline

◆ unordered_multimap() [5/13]

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::unordered_multimap ( const ALLOCATOR &  basicAllocator)
inlineexplicit

Create an empty unordered multimap. Optionally specify an initialNumBuckets indicating the minimum initial size of the array of buckets of this container. If initialNumBuckets is not supplied, a single empty bucket is used. Optionally specify a hashFunction used to generate the hash values for the keys contained in this unordered multimap. If hashFunction is not supplied, a default-constructed object of the (template parameter) type HASH is used. Optionally specify a key-equivalence functor keyEqual used to verify that two keys are equivalent. If keyEqual is not supplied, a default-constructed object of the (template parameter) type EQUAL is used. Optionally specify a basicAllocator used to supply memory. If basicAllocator is not supplied, a default-constructed object of the (template parameter) type ALLOCATOR is used. If the type ALLOCATOR is bsl::allocator (the default), then basicAllocator, if supplied, shall be convertible to bslma::Allocator *. If the type ALLOCATOR is bsl::allocator and basicAllocator is not supplied, the currently installed default allocator is used.

◆ unordered_multimap() [6/13]

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::unordered_multimap ( const unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR > &  original)
inline

Create an unordered multimap having the same value as the specified original object. Use a copy of original.hash_function() to generate hash values for the keys contained in this unordered multimap. Use a copy of original.key_eq() to verify that two keys are equivalent. Use the allocator returned by bsl::allocator_traits<ALLOCATOR>:: select_on_container_copy_construction(original.get_allocator()) to allocate memory. This method requires that the (template parameter) types KEY and VALUE both be copy-insertable into this unordered multimap (see {Requirements on KEY and VALUE}).

◆ unordered_multimap() [7/13]

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::unordered_multimap ( BloombergLP::bslmf::MovableRef< unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR > >  original)
inline

Create an unordered multimap having the same value as the specified original object by moving (in constant time) the contents of original to the new unordered multimap. Use a copy of original.hash_function() to generate hash values for the keys contained in this unordered multimap. Use a copy of original.key_eq() to verify that two keys are equivalent. The allocator associated with original is propagated for use in the newly-created unordered multimap. original is left in a valid but unspecified state.

◆ unordered_multimap() [8/13]

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::unordered_multimap ( const unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR > &  original,
const typename type_identity< ALLOCATOR >::type &  basicAllocator 
)
inline

Create an unordered multimap having the same value as the specified original object that uses the specified basicAllocator to supply memory. Use a copy of original.hash_function() to generate hash values for the keys contained in this unordered multimap. Use a copy of original.key_eq() to verify that two keys are equivalent. This method requires that the (template parameter) types KEY and VALUE both be copy-insertable into this unordered multimap (see {Requirements on KEY and VALUE}). Note that a bslma::Allocator * can be supplied for basicAllocator if the (template parameter) type ALLOCATOR is bsl::allocator (the default).

◆ unordered_multimap() [9/13]

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::unordered_multimap ( BloombergLP::bslmf::MovableRef< unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR > >  original,
const typename type_identity< ALLOCATOR >::type &  basicAllocator 
)
inline

Create an unordered multimap having the same value as the specified original object that uses the specified basicAllocator to supply memory. The contents of original are moved (in constant time) to the new unordered multimap if basicAllocator == original.get_allocator(), and are move-inserted (in linear time) using basicAllocator otherwise. original is left in a valid but unspecified state. Use a copy of original.hash_function() to generate hash values for the keys contained in this unordered multimap. Use a copy of original.key_eq() to verify that two keys are equivalent. This method requires that the (template parameter) types KEY and VALUE both be move-insertable into this unordered multimap (see {Requirements on KEY and VALUE}). Note that a bslma::Allocator * can be supplied for basicAllocator if the (template parameter) type ALLOCATOR is bsl::allocator (the default).

◆ unordered_multimap() [10/13]

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
template<class INPUT_ITERATOR >
bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::unordered_multimap ( INPUT_ITERATOR  first,
INPUT_ITERATOR  last,
size_type  initialNumBuckets = 0,
const HASH &  hashFunction = HASH(),
const EQUAL &  keyEqual = EQUAL(),
const ALLOCATOR &  basicAllocator = ALLOCATOR() 
)
inline

Create an unordered multimap, and insert each value_type object in the sequence starting at the specified first element, and ending immediately before the specified last element. Optionally specify an initialNumBuckets indicating the minimum initial size of the array of buckets of this container. If initialNumBuckets is not supplied, a single empty bucket is used if first and last denote an empty range, and an unspecified number of buckets is used otherwise. Optionally specify a hashFunction used to generate hash values for the keys contained in this unordered multimap. If hashFunction is not supplied, a default-constructed object of (template parameter) type HASH is used. Optionally specify a key-equivalence functor keyEqual used to verify that two keys are equivalent. If keyEqual is not supplied, a default-constructed object of (template parameter) type EQUAL is used. Optionally specify a basicAllocator used to supply memory. If basicAllocator is not supplied, a default-constructed object of the (template parameter) type ALLOCATOR is used. If the type ALLOCATOR is bsl::allocator and basicAllocator is not supplied, the currently installed default allocator is used to supply memory. The (template parameter) type INPUT_ITERATOR shall meet the requirements of an input iterator defined in the C++11 standard [24.2.3] providing access to values of a type convertible to value_type, and value_type must be emplace-constructible from *i into this unordered multimap, where i is a dereferenceable iterator in the range [first .. last) (see {Requirements on KEY and VALUE}). The behavior is undefined unless first and last refer to a sequence of valid values where first is at a position at or before last. Note that a bslma::Allocator * can be supplied for basicAllocator if the type ALLOCATOR is bsl::allocator (the default).

◆ unordered_multimap() [11/13]

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
template<class INPUT_ITERATOR >
bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::unordered_multimap ( INPUT_ITERATOR  first,
INPUT_ITERATOR  last,
size_type  initialNumBuckets,
const HASH &  hashFunction,
const ALLOCATOR &  basicAllocator 
)
inline

◆ unordered_multimap() [12/13]

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
template<class INPUT_ITERATOR >
bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::unordered_multimap ( INPUT_ITERATOR  first,
INPUT_ITERATOR  last,
size_type  initialNumBuckets,
const ALLOCATOR &  basicAllocator 
)
inline

◆ unordered_multimap() [13/13]

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
template<class INPUT_ITERATOR >
bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::unordered_multimap ( INPUT_ITERATOR  first,
INPUT_ITERATOR  last,
const ALLOCATOR &  basicAllocator 
)
inline

◆ ~unordered_multimap()

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::~unordered_multimap ( )

Member Function Documentation

◆ begin() [1/4]

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::iterator bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::begin ( )
inline

Assign to this object the value, hash function, and key-equivalence comparator of the specified rhs object, propagate to this object the allocator of rhs if the ALLOCATOR type has trait propagate_on_container_move_assignment, and return a reference providing modifiable access to this object. The contents of rhs are moved (in constant time) to this unordered multimap if get_allocator() == rhs.get_allocator() (after accounting for the aforementioned trait); otherwise, all elements in this unordered multimap are either destroyed or move-assigned to, and each additional element in rhs is move-inserted into this unordered multimap. rhs is left in a valid but unspecified state, and if an exception is thrown, *this is left in a valid but unspecified state. This method requires that the (template parameter) types KEY and VALUE both be move-assignable and move-insertable into this unordered multimap (see {Requirements on KEY and VALUE}). Return an iterator providing modifiable access to the first value_type object (in the sequence of value_type objects) maintained by this unordered multimap, or the end iterator if this unordered multimap is empty.

◆ begin() [2/4]

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::const_iterator bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::begin ( ) const

◆ begin() [3/4]

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::local_iterator bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::begin ( size_type  index)
inline

Return a local iterator providing modifiable access to the first value_type object in the sequence of value_type objects of the bucket having the specified index in the array of buckets maintained by this unordered multimap, or the end(index) iterator if the indexed bucket is empty. The behavior is undefined unless index < bucket_count().

◆ begin() [4/4]

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::const_local_iterator bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::begin ( size_type  index) const
inline

◆ bucket()

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::size_type bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::bucket ( const key_type key) const
inline

Return the index of the bucket, in the array of buckets of this container, where a value with a key equivalent to the specified key would be inserted.

◆ bucket_count()

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::size_type bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::bucket_count ( ) const
inline

Return the number of buckets in the array of buckets maintained by this unordered multimap.

◆ bucket_size()

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::size_type bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::bucket_size ( size_type  index) const
inline

Return the number of elements contained in the bucket at the specified index in the array of buckets maintained by this container. The behavior is undefined unless index < bucket_count().

◆ cbegin() [1/2]

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::const_iterator bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::cbegin ( ) const

Return an iterator providing non-modifiable access to the first value_type object in the sequence of value_type objects maintained by this unordered multimap, or the end iterator if this unordered multimap is empty.

◆ cbegin() [2/2]

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::const_local_iterator bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::cbegin ( size_type  index) const
inline

Return a local iterator providing non-modifiable access to the first value_type object (in the sequence of value_type objects) of the bucket having the specified index in the array of buckets maintained by this unordered multimap, or the end(index) iterator if the indexed bucket is empty. The behavior is undefined unless index < bucket_count().

◆ cend() [1/2]

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::const_iterator bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::cend ( ) const
inline

Return an iterator providing non-modifiable access to the past-the-end position in the sequence of value_type objects maintained by this unordered multimap.

◆ cend() [2/2]

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::const_local_iterator bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::cend ( size_type  index) const
inline

Return a local iterator providing non-modifiable access to the past-the-end position (in the sequence of value_type objects) of the bucket having the specified index in the array of buckets maintained by this unordered multimap. The behavior is undefined unless index < bucket_count().

◆ clear()

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
void bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::clear ( )
inline

Remove all entries from this unordered multimap. Note that this object will be empty after this call, but allocated memory may be retained for future use.

◆ contains() [1/2]

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
bool bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::contains ( const key_type key) const
inline

Return true if this unordered map contains an element whose key is equivalent to the specified key.

◆ contains() [2/2]

template<class KEY , class VALUE , class HASH = bsl::hash<KEY>, class EQUAL = bsl::equal_to<KEY>, class ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE> >>
template<class LOOKUP_KEY >
enable_if< BloombergLP::bslmf::IsTransparentPredicate< HASH, LOOKUP_KEY >::value &&BloombergLP::bslmf::IsTransparentPredicate< EQUAL, LOOKUP_KEY >::value, bool >::type bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::contains ( const LOOKUP_KEY &  key) const
inline

Return true if this unordered map contains an element whose key is equivalent to the specified key.

◆ count() [1/2]

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::size_type bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::count ( const key_type key) const

Return the number of value_type objects in this unordered multimap with a key equivalent to the specified key.

◆ count() [2/2]

template<class KEY , class VALUE , class HASH = bsl::hash<KEY>, class EQUAL = bsl::equal_to<KEY>, class ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE> >>
template<class LOOKUP_KEY >
enable_if< BloombergLP::bslmf::IsTransparentPredicate< HASH, LOOKUP_KEY >::value &&BloombergLP::bslmf::IsTransparentPredicate< EQUAL, LOOKUP_KEY >::value, size_type >::type bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::count ( const LOOKUP_KEY &  key) const
inline

Return the number of value_type objects in this unordered multimap with a key equivalent to the specified key. The behavior is undefined unless key is equivalent to the key of the elements of at most one equivalent-key group in this unordered multimap.

◆ emplace()

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
template<class... Args>
unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::iterator bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::emplace ( Args &&...  args)
inline

Insert into this unordered multimap a newly created value_type object, constructed by forwarding get_allocator() (if required) and the specified (variable number of) args to the corresponding constructor of value_type. Return an iterator referring to the newly created and inserted object in this unordered multimap. This method requires that the (template parameter) types KEY and VALUE both be emplace-constructible from args (see {Requirements on KEY and VALUE}).

◆ emplace_hint()

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
template<class... Args>
unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::iterator bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::emplace_hint ( const_iterator  hint,
Args &&...  args 
)
inline

Insert into this unordered multimap a newly created value_type object, constructed by forwarding get_allocator() (if required) and the specified (variable number of) args to the corresponding constructor of value_type (in constant time if the specified hint refers to an element in this container with a key equivalent to the key of the newly created value_type object), and return an iterator referring to the newly created and inserted object. If hint does not refer to an element in this container with a key equivalent to the key of the newly created value_type object, this operation has worst case O[N] and average case constant-time complexity, where N is the size of this unordered multimap. This method requires that the (template parameter) types KEY and VALUE both be emplace-constructible from args (see {Requirements on KEY and VALUE}). The behavior is undefined unless hint is an iterator in the range [begin() .. end()] (both endpoints included).

◆ empty()

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
bool bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::empty ( ) const
inline

Return true if this unordered multimap contains no elements, and false otherwise.

◆ end() [1/4]

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::iterator bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::end ( )
inline

Return an iterator providing modifiable access to the past-the-end position in the sequence of value_type objects maintained by this unordered multimap.

◆ end() [2/4]

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::const_iterator bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::end ( ) const
inline

◆ end() [3/4]

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::local_iterator bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::end ( size_type  index)
inline

Return a local iterator providing modifiable access to the past-the-end position in the sequence of value_type objects of the bucket having the specified index in the array of buckets maintained by this unordered multimap. The behavior is undefined unless index < bucket_count().

◆ end() [4/4]

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::const_local_iterator bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::end ( size_type  index) const
inline

◆ equal_range() [1/4]

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
bsl::pair< typename unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::iterator, typename unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::iterator > bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::equal_range ( const key_type key)

Return a pair of iterators providing modifiable access to the sequence of value_type objects in this unordered multimap with a key equivalent to the specified key, where the first iterator is positioned at the start of the sequence, and the second is positioned one past the end of the sequence. If this unordered multimap contains no value_type objects with a key equivalent to key, then the two returned iterators will have the same value.

◆ equal_range() [2/4]

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
bsl::pair< typename unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::const_iterator, typename unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::const_iterator > bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::equal_range ( const key_type key) const

Return a pair of iterators providing non-modifiable access to the sequence of value_type objects in this unordered multimap with a key equivalent to the specified key, where the first iterator is positioned at the start of the sequence, and the second is positioned one past the end of the sequence. If this unordered multimap contains no value_type objects with a key equivalent to key, then the two returned iterators will have the same value.

◆ equal_range() [3/4]

template<class KEY , class VALUE , class HASH = bsl::hash<KEY>, class EQUAL = bsl::equal_to<KEY>, class ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE> >>
template<class LOOKUP_KEY >
enable_if< BloombergLP::bslmf::IsTransparentPredicate< HASH, LOOKUP_KEY >::value &&BloombergLP::bslmf::IsTransparentPredicate< EQUAL, LOOKUP_KEY >::value, pair< iterator, iterator > >::type bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::equal_range ( const LOOKUP_KEY &  key)
inline

Return a pair of iterators providing modifiable access to the sequence of value_type objects in this unordered multimap with a key equivalent to the specified key, where the first iterator is positioned at the start of the sequence, and the second is positioned one past the end of the sequence. If this unordered multimap contains no value_type objects with a key equivalent to key, then the two returned iterators will have the same value. The behavior is undefined unless key is equivalent to the key of the elements of at most one equivalent-key group in this unordered multimap.

◆ equal_range() [4/4]

template<class KEY , class VALUE , class HASH = bsl::hash<KEY>, class EQUAL = bsl::equal_to<KEY>, class ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE> >>
template<class LOOKUP_KEY >
enable_if< BloombergLP::bslmf::IsTransparentPredicate< HASH, LOOKUP_KEY >::value &&BloombergLP::bslmf::IsTransparentPredicate< EQUAL, LOOKUP_KEY >::value, pair< const_iterator, const_iterator > >::type bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::equal_range ( const LOOKUP_KEY &  key) const
inline

Return a pair of iterators providing non-modifiable access to the sequence of value_type objects in this unordered multimap with a key equivalent to the specified key, where the first iterator is positioned at the start of the sequence, and the second is positioned one past the end of the sequence. If this unordered multimap contains no value_type objects with a key equivalent to key, then the two returned iterators will have the same value. The behavior is undefined unless key is equivalent to the key of the elements of at most one equivalent-key group in this unordered multimap.

◆ erase() [1/4]

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::size_type bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::erase ( const key_type key)

Remove from this unordered multimap all value_type objects with a key equivalent to the specified key, if such exist, and return the number of objects erased; otherwise, if there are no value_type objects with a key equivalent to key, return 0 with no other effect. This method invalidates only iterators and references to the removed element and previously saved values of the end() iterator, and preserves the relative order of the elements not removed.

◆ erase() [2/4]

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::iterator bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::erase ( const_iterator  first,
const_iterator  last 
)

Remove from this unordered multimap the value_type objects starting at the specified first position up to, but not including, the specified last position, and return last. This method invalidates only iterators and references to the removed element and previously saved values of the end() iterator, and preserves the relative order of the elements not removed. The behavior is undefined unless first and last either refer to elements in this unordered multimap or are the end iterator, and the first position is at or before the last position in the sequence provided by this container.

◆ erase() [3/4]

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::iterator bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::erase ( const_iterator  position)
inline

◆ erase() [4/4]

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::iterator bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::erase ( iterator  position)
inline

Remove from this unordered multimap the value_type object at the specified position, and return an iterator referring to the element immediately following the removed element, or to the past-the-end position if the removed element was the last element in the sequence of elements maintained by this unordered multimap. This method invalidates only iterators and references to the removed element and previously saved values of the end() iterator, and preserves the relative order of the elements not removed. The behavior is undefined unless position refers to a value_type object in this unordered multimap.

◆ find() [1/4]

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::iterator bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::find ( const key_type key)
inline

Return an iterator providing modifiable access to the first value_type object in the sequence of all the value_type objects of this unordered multimap with a key equivalent to the specified key, if such entries exist, and the past-the-end (end) iterator otherwise.

◆ find() [2/4]

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::const_iterator bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::find ( const key_type key) const
inline

Return an iterator providing non-modifiable access to the first value_type object in the sequence of value_type objects of this unordered multimap with a key equivalent to the specified key, if such entries exist, and the past-the-end (end) iterator otherwise.

◆ find() [3/4]

template<class KEY , class VALUE , class HASH = bsl::hash<KEY>, class EQUAL = bsl::equal_to<KEY>, class ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE> >>
template<class LOOKUP_KEY >
enable_if< BloombergLP::bslmf::IsTransparentPredicate< HASH, LOOKUP_KEY >::value &&BloombergLP::bslmf::IsTransparentPredicate< EQUAL, LOOKUP_KEY >::value, iterator >::type bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::find ( const LOOKUP_KEY &  key)
inline

Return an iterator providing modifiable access to the first value_type object in the sequence of all the value_type objects of this unordered multimap with a key equivalent to the specified key, if such entries exist, and the past-the-end (end) iterator otherwise. The behavior is undefined unless key is equivalent to the key of the elements of at most one equivalent-key group in this unordered multimap.

◆ find() [4/4]

template<class KEY , class VALUE , class HASH = bsl::hash<KEY>, class EQUAL = bsl::equal_to<KEY>, class ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE> >>
template<class LOOKUP_KEY >
enable_if< BloombergLP::bslmf::IsTransparentPredicate< HASH, LOOKUP_KEY >::value &&BloombergLP::bslmf::IsTransparentPredicate< EQUAL, LOOKUP_KEY >::value, const_iterator >::type bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::find ( const LOOKUP_KEY &  key) const
inline

Return an iterator providing modifiable access to the first value_type object in this unordered multimap whose key is equivalent to the specified key, if such an entry exists, and the past-the-end (end) iterator otherwise. The behavior is undefined unless key is equivalent to the key of the elements of at most one equivalent-key group in this unordered multimap.

◆ hash_function()

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::hasher bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::hash_function ( ) const
inline

Return (a copy of) the hash unary functor used by this unordered multimap to generate a hash value (of type size_type) for a key_type object.

◆ insert() [1/5]

template<class KEY , class VALUE , class HASH = bsl::hash<KEY>, class EQUAL = bsl::equal_to<KEY>, class ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE> >>
template<class ALT_VALUE_TYPE >
enable_if< is_convertible< ALT_VALUE_TYPE, value_type >::value, iterator >::type bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::insert ( BSLS_COMPILERFEATURES_FORWARD_REF(ALT_VALUE_TYPE)  value)
inline

◆ insert() [2/5]

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::iterator bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::insert ( const value_type value)
inline

Insert the specified value into this unordered multimap, and return an iterator referring to the newly inserted value_type object. This method requires that the (template parameter) types KEY and VALUE both be copy-insertable into this unordered multimap (see {Requirements on KEY and VALUE}).

◆ insert() [3/5]

template<class KEY , class VALUE , class HASH = bsl::hash<KEY>, class EQUAL = bsl::equal_to<KEY>, class ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE> >>
template<class ALT_VALUE_TYPE >
enable_if< is_convertible< ALT_VALUE_TYPE, value_type >::value, iterator >::type bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::insert ( const_iterator  hint,
BSLS_COMPILERFEATURES_FORWARD_REF(ALT_VALUE_TYPE)  value 
)
inline

◆ insert() [4/5]

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::iterator bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::insert ( const_iterator  hint,
const value_type value 
)
inline

Insert the specified value into this unordered multimap (in constant time if the specified hint refers to an element in this container with a key equivalent to the key of value), and return an iterator referring to the newly inserted value_type object. If hint does not refer to an element in this container with a key equivalent to the key of value, this operation has worst case O[N] and average case constant-time complexity, where N is the size of this unordered multimap. This method requires that the (template parameter) types KEY and VALUE both be copy-insertable into this unordered multimap (see {Requirements on KEY and VALUE}). The behavior is undefined unless hint is an iterator in the range [begin() .. end()] (both endpoints included).

◆ insert() [5/5]

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
template<class INPUT_ITERATOR >
void bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::insert ( INPUT_ITERATOR  first,
INPUT_ITERATOR  last 
)

Insert into this unordered multimap the value of each value_type object in the range starting at the specified first iterator and ending immediately before the specified last iterator. The (template parameter) type INPUT_ITERATOR shall meet the requirements of an input iterator defined in the C++11 standard [24.2.3] providing access to values of a type convertible to value_type, and value_type must be emplace-constructible from *i into this unordered multimap, where i is a dereferenceable iterator in the range [first .. last) (see {Requirements on KEY and VALUE}). The behavior is undefined unless first and last refer to a sequence of valid values where first is at a position at or before last.

◆ key_eq()

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::key_equal bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::key_eq ( ) const
inline

Return (a copy of) the key-equivalence binary functor that returns true if the value of two key_type objects are equivalent, and false otherwise.

◆ load_factor()

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
float bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::load_factor ( ) const
inline

Return the current ratio between the size of this container and the number of buckets. The load factor is a measure of how full the container is, and a higher load factor typically leads to an increased number of collisions, thus resulting in a loss of performance.

◆ max_bucket_count()

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::size_type bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::max_bucket_count ( ) const
inline

Return a theoretical upper bound on the largest number of buckets that this container could possibly manage. Note that there is no guarantee that the unordered multimap can successfully grow to the returned size, or even close to that size without running out of resources.

◆ max_load_factor() [1/2]

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
float bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::max_load_factor ( ) const
inline

Return the maximum load factor allowed for this container. Note that if an insert operation would cause the load factor to exceed the max_load_factor, that same insert operation will increase the number of buckets and rehash the elements of the container into those buckets (see rehash).

◆ max_load_factor() [2/2]

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
void bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::max_load_factor ( float  newLoadFactor)
inline

Set the maximum load factor of this container to the specified newLoadFactor.

◆ max_size()

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::size_type bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::max_size ( ) const
inline

Return a theoretical upper bound on the largest number of elements that this unordered multimap could possibly hold. Note that there is no guarantee that the unordered multimap can successfully grow to the returned size, or even close to that size without running out of resources.

◆ operator=()

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR > & bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::operator= ( const unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR > &  rhs)
inline

Assign to this object the value, hash function, and key-equivalence comparator of the specified rhs object, propagate to this object the allocator of rhs if the ALLOCATOR type has trait propagate_on_container_copy_assignment, and return a reference providing modifiable access to this object. If an exception is thrown, *this is left in a valid but unspecified state. This method requires that the (template parameter) types KEY and VALUE both be copy-assignable and copy-insertable into this unordered multimap (see {Requirements on KEY and VALUE}).

◆ rehash()

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
void bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::rehash ( size_type  numBuckets)
inline

Change the size of the array of buckets maintained by this container to the specified numBuckets, and redistribute all the contained elements into the new sequence of buckets, according to their hash values. Note that this operation has no effect if rehashing the elements into numBuckets would cause this unordered multimap to exceed its max_load_factor.

◆ reserve()

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
void bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::reserve ( size_type  numElements)
inline

Increase the number of buckets of this unordered multimap to a quantity such that the ratio between the specified numElements and the new number of buckets does not exceed max_load_factor. Note that this guarantees that, after the reserve, elements can be inserted to grow the container to size() == numElements without rehashing. Also note that memory allocations may still occur when growing the container to size() == numElements. Also note that this operation has no effect if numElements <= size().

◆ size()

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::size_type bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::size ( ) const
inline

Friends And Related Symbol Documentation

◆ operator==

template<class KEY , class VALUE , class HASH = bsl::hash<KEY>, class EQUAL = bsl::equal_to<KEY>, class ALLOCATOR = bsl::allocator<bsl::pair<const KEY, VALUE> >>
template<class KEY2 , class VALUE2 , class HASH2 , class EQUAL2 , class ALLOCATOR2 >
bool operator== ( const unordered_multimap< KEY2, VALUE2, HASH2, EQUAL2, ALLOCATOR2 > &  ,
const unordered_multimap< KEY2, VALUE2, HASH2, EQUAL2, ALLOCATOR2 > &   
)
friend

Member Data Documentation

◆ get_allocator

template<class KEY , class VALUE , class HASH , class EQUAL , class ALLOCATOR >
ALLOCATOR bsl::unordered_multimap< KEY, VALUE, HASH, EQUAL, ALLOCATOR >::get_allocator
inline

Return (a copy of) the allocator used for memory allocation by this unordered multimap.


The documentation for this class was generated from the following file: