[#bsl-unordered_multimap-0b0] = xref:bsl.adoc[bsl]::unordered_multimap :relfileprefix: ../ :mrdocs: Unordered associative container mapping keys to values, allowing duplicates. == Synopsis Declared in `<bslstl_unorderedmultimap.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class KEY, class VALUE, class HASH = xref:bsl/hash-06.adoc[bsl::hash<KEY>], class EQUAL = xref:bsl/equal_to-0d.adoc[bsl::equal_to<KEY>], class ALLOCATOR = xref:bsl/allocator-0df.adoc[bsl::allocator<bsl::pair<KEY const, VALUE>>]> class unordered_multimap; ---- == Description 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`}. == Type Aliases [cols="1,4"] |=== | Name| Description | xref:bsl/unordered_multimap-0b0/allocator_type.adoc[`allocator_type`] | This `typedef` is an alias for `allocator_type`. | xref:bsl/unordered_multimap-0b0/const_iterator.adoc[`const_iterator`] | This `typedef` is an alias for `const_iterator`. | xref:bsl/unordered_multimap-0b0/const_local_iterator.adoc[`const_local_iterator`] | This `typedef` is an alias for `const_local_iterator`. | xref:bsl/unordered_multimap-0b0/const_pointer.adoc[`const_pointer`] | This `typedef` is an alias to `AllocatorTraits::const_pointer`. | xref:bsl/unordered_multimap-0b0/const_reference.adoc[`const_reference`] | This `typedef` is an alias for `const_reference`. | xref:bsl/unordered_multimap-0b0/difference_type.adoc[`difference_type`] | This `typedef` is an alias for `difference_type`. | xref:bsl/unordered_multimap-0b0/hasher.adoc[`hasher`] | This `typedef` is an alias to the (template parameter) `HASH`. | xref:bsl/unordered_multimap-0b0/iterator.adoc[`iterator`] | This `typedef` is an alias for `iterator`. | xref:bsl/unordered_multimap-0b0/key_equal.adoc[`key_equal`] | This `typedef` is an alias for `key_equal`. | xref:bsl/unordered_multimap-0b0/key_type.adoc[`key_type`] | This `typedef` is an alias for `key_type`. | xref:bsl/unordered_multimap-0b0/local_iterator.adoc[`local_iterator`] | This `typedef` is an alias for `local_iterator`. | xref:bsl/unordered_multimap-0b0/mapped_type.adoc[`mapped_type`] | This `typedef` is an alias for `mapped_type`. | xref:bsl/unordered_multimap-0b0/pointer.adoc[`pointer`] | This `typedef` is an alias for `pointer`. | xref:bsl/unordered_multimap-0b0/reference.adoc[`reference`] | This `typedef` is an alias to `value_type&`. | xref:bsl/unordered_multimap-0b0/size_type.adoc[`size_type`] | This `typedef` is an alias for `size_type`. | xref:bsl/unordered_multimap-0b0/value_type.adoc[`value_type`] | This `typedef` is an alias to `bsl::pair<const KEY, VALUE>`. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:bsl/unordered_multimap-0b0/2constructor-06.adoc[`unordered_multimap`] [.small]#[constructor]# | Constructors | xref:bsl/unordered_multimap-0b0/2destructor.adoc[`~unordered_multimap`] [.small]#[destructor]# | Destroy this object. | xref:bsl/unordered_multimap-0b0/operator_assign-0b.adoc[`operator=`] | Assignment operators | xref:bsl/unordered_multimap-0b0/begin-096.adoc[`begin`] | `begin` overloads | xref:bsl/unordered_multimap-0b0/bucket-00d.adoc[`bucket`] | `bucket` overloads | xref:bsl/unordered_multimap-0b0/bucket_count.adoc[`bucket_count`] | Return the number of buckets in the array of buckets maintained by this unordered multimap. | xref:bsl/unordered_multimap-0b0/bucket_size.adoc[`bucket_size`] | Return the number of elements in the bucket at `index`. | xref:bsl/unordered_multimap-0b0/cbegin-01.adoc[`cbegin`] | `cbegin` overloads | xref:bsl/unordered_multimap-0b0/cend-03.adoc[`cend`] | `cend` overloads | xref:bsl/unordered_multimap-0b0/clear.adoc[`clear`] | 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. | xref:bsl/unordered_multimap-0b0/contains-0e.adoc[`contains`] | Return `true` if this container has an element with key equivalent to `key`. | xref:bsl/unordered_multimap-0b0/count-09.adoc[`count`] | Return the number of elements with a key equivalent to `key`. | xref:bsl/unordered_multimap-0b0/emplace.adoc[`emplace`] | Emplace a newly constructed element into this container. | xref:bsl/unordered_multimap-0b0/emplace_hint.adoc[`emplace_hint`] | Emplace a newly constructed element near `hint`. | xref:bsl/unordered_multimap-0b0/empty.adoc[`empty`] | Return `true` if this unordered multimap contains no elements, and `false` otherwise. | xref:bsl/unordered_multimap-0b0/end-0d.adoc[`end`] | `end` overloads | xref:bsl/unordered_multimap-0b0/equal_range-0c.adoc[`equal_range`] | Return an iterator pair covering elements with key equivalent to `key`. | xref:bsl/unordered_multimap-0b0/erase-0b5.adoc[`erase`] | `erase` overloads | xref:bsl/unordered_multimap-0b0/find-00.adoc[`find`] | Return an iterator to the first element with key equivalent to `key`. | xref:bsl/unordered_multimap-0b0/get_allocator.adoc[`get_allocator`] | Return (a copy of) the allocator used for memory allocation by this unordered multimap. | xref:bsl/unordered_multimap-0b0/hash_function.adoc[`hash_function`] | 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. | xref:bsl/unordered_multimap-0b0/insert-0a.adoc[`insert`] | `insert` overloads | xref:bsl/unordered_multimap-0b0/insert_range.adoc[`insert_range`] | Insert each element from the specified `range`. | xref:bsl/unordered_multimap-0b0/key_eq.adoc[`key_eq`] | 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. | xref:bsl/unordered_multimap-0b0/load_factor.adoc[`load_factor`] | Return the current load factor of this container. | xref:bsl/unordered_multimap-0b0/max_bucket_count.adoc[`max_bucket_count`] | Return a theoretical upper bound on the number of buckets. | xref:bsl/unordered_multimap-0b0/max_load_factor-0f.adoc[`max_load_factor`] | `max_load_factor` overloads | xref:bsl/unordered_multimap-0b0/max_size.adoc[`max_size`] | Return a theoretical upper bound on the number of elements. | xref:bsl/unordered_multimap-0b0/rehash.adoc[`rehash`] | Rehash this container to have at least `numBuckets` buckets. | xref:bsl/unordered_multimap-0b0/reserve.adoc[`reserve`] | Reserve capacity for at least `numElements` without rehashing. | xref:bsl/unordered_multimap-0b0/size.adoc[`size`] | Return the number of elements in this unordered multimap. | xref:bsl/unordered_multimap-0b0/swap.adoc[`swap`] | Exchange the contents of this object with those of `other`. |=== == Deduction Guides [cols="1,4"] |=== | Name| Description | xref:bsl/unordered_multimap-0d8.adoc[`unordered_multimap<KEY, VALUE>`] | Deduce template arguments from an initializer‐list constructor. | xref:bsl/unordered_multimap-02.adoc[`unordered_multimap<KEY, VALUE>`] | Deduce template arguments from an initializer‐list constructor. | xref:bsl/unordered_multimap-048a.adoc[`unordered_multimap<KEY, VALUE>`] | Deduce template arguments from an initializer‐list constructor. | xref:bsl/unordered_multimap-07.adoc[`unordered_multimap<KEY, VALUE>`] | Deduce template arguments from iterators with size and `bslma` allocator. | xref:bsl/unordered_multimap-044.adoc[`unordered_multimap<KEY, VALUE, HASH>`] | Deduce template arguments from an initializer‐list constructor. | xref:bsl/unordered_multimap-08f.adoc[`unordered_multimap<KEY, VALUE, HASH>`] | Deduce template arguments from a constructor taking a `bslma` allocator. | xref:bsl/unordered_multimap-00.adoc[`unordered_multimap<KEY, VALUE, HASH, EQUAL>`] | Deduce template arguments from an initializer‐list constructor. | xref:bsl/unordered_multimap-06.adoc[`unordered_multimap<KEY, VALUE, HASH, EQUAL>`] | Deduce template arguments from a constructor taking a `bslma` allocator. | xref:bsl/unordered_multimap-0e.adoc[`unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>`] | Deduce template arguments from an initializer‐list constructor. | xref:bsl/unordered_multimap-0d6.adoc[`unordered_multimap<KEY, VALUE, HASH, EQUAL, ALLOCATOR>`] | Deduce template arguments for an `unordered_multimap` constructor. | xref:bsl/unordered_multimap-048e.adoc[`unordered_multimap<KEY, VALUE, HASH, bsl::equal_to<KEY>, ALLOCATOR>`] | Deduce template arguments from an initializer‐list constructor. | xref:bsl/unordered_multimap-084.adoc[`unordered_multimap<KEY, VALUE, HASH, bsl::equal_to<KEY>, ALLOCATOR>`] | Deduce template arguments for an `unordered_multimap` constructor. | xref:bsl/unordered_multimap-04c.adoc[`unordered_multimap<KEY, VALUE, bsl::hash<KEY>, bsl::equal_to<KEY>, ALLOCATOR>`] | Deduce template arguments from an initializer‐list constructor. | xref:bsl/unordered_multimap-0b8.adoc[`unordered_multimap<KEY, VALUE, bsl::hash<KEY>, bsl::equal_to<KEY>, ALLOCATOR>`] | Deduce template arguments from an initializer‐list constructor. | xref:bsl/unordered_multimap-0b6.adoc[`unordered_multimap<KEY, VALUE, bsl::hash<KEY>, bsl::equal_to<KEY>, ALLOCATOR>`] | Deduce template arguments for an `unordered_multimap` constructor. | xref:bsl/unordered_multimap-04e.adoc[`unordered_multimap<KEY, VALUE, bsl::hash<KEY>, bsl::equal_to<KEY>, ALLOCATOR>`] | Deduce template arguments for an `unordered_multimap` constructor. |=== == Friends [cols="1,4"] |=== | Name| Description | `xref:bsl/operator_eq-068.adoc[bsl::operator==]` | Return `true` if `lhs` and `rhs` have the same value. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:bsl/erase_if-0aa.adoc[`erase_if`] | Erase every element of `m` that satisfies `predicate`. | xref:bsl/operator_eq-08a.adoc[`operator==`] | Return `true` if `lhs` and `rhs` have the same value. | xref:bsl/swap-08c.adoc[`swap`] | Exchange the value of `a` with that of `b`. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#