Create an unordered multimap from the elements of range.
Declared in <bslstl_unorderedmultimap.h>
template<class RANGE>
unordered_multimap(
std::from_range_t tag,
RANGE&& range,
size_type initialNumBuckets = 0,
HASH const& hashFunction = HASH(),
EQUAL const& keyEqual = EQUAL(),
ALLOCATOR const& basicAllocator = ALLOCATOR());
Create an unordered multimap, and insert each value_type object in the specified range. Optionally specify an initialNumBuckets indicating the initial size of the array of buckets of this container. If initialNumBuckets is not supplied, an implementation-defined value is used. Optionally specify a hashFunction used to generate the hash values for each key value 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-equality functor keyEqual used to determine whether two keys have the same value. 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. This operation has O[N] complexity, where N is the number of elements in range. Note that RANGE must meet the requirements of an input range and the values from range must have a type matching or convertible to value_type.
| Name | Description |
|---|---|
| tag | disambiguation tag for range construction |
| range | input range of key/value pairs to insert |
| initialNumBuckets | minimum initial number of buckets |
| hashFunction | hash function for keys |
| keyEqual | key-equality functor |
| basicAllocator | allocator used to supply memory |