Create an unordered multimap and insert each value_type object in the specified values initializer list. 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 values is empty, and an unspecified number of buckets is used otherwise. 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 and basicAllocator is not supplied, the currently installed default allocator is used to supply 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}). Note that a bslma::Allocator * can be supplied for basicAllocator if the type ALLOCATOR is bsl::allocator (the default).
Synopsis
Declared in <bslstl_unorderedmultimap.h>
template<
class = void,
class = void,
class = void>
requires std::is_invocable_v<HASH, const KEY &> && std::is_invocable_v<EQUAL, const KEY &, const KEY &> && bsl::IsStdAllocator_v<ALLOCATOR>
unordered_multimap(
std::initializer_list<value_type> values,
size_type initialNumBuckets = 0,
HASH const& hashFunction = HASH(),
EQUAL const& keyEqual = EQUAL(),
ALLOCATOR const& basicAllocator = ALLOCATOR());
Created with MrDocs