bsl::unordered_map<basic_string<char>, Json, TransparentHash, TransparentEqualTo>::unordered_map

Create an empty unordered map having a max_load_factor of 1.0. Optionally specify an initialNumBuckets indicating the minimum initial size of the array of buckets of this unordered map. If initialNumBuckets is not supplied, one empty bucket shall be used and no memory allocated. Optionally specify a hashFunction used to generate the hash values associated with the KEY-VALUE pairs contained in this unordered map. 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 are equivalent. If keyEqual is not supplied, a default-constructed object of the (template parameter) type EQUAL is used. Optionally specify the basicAllocator used to supply memory. If basicAllocator is not supplied, a default-constructed object of the (template parameter) type ALLOCATOR is used. If the ALLOCATOR type is bsl::allocator (the default), then basicAllocator shall be convertible to bslma::Allocator *. If the ALLOCATOR type is bsl::allocator and basicAllocator is not supplied, the currently installed default allocator is used to supply memory. Note that more than initialNumBuckets buckets may be created in order to preserve the bucket allocation strategy of the hash-table (but never fewer).

Synopsis

Declared in <bslstl_unorderedmap.h>

explicit
unordered_map(
    size_type initialNumBuckets,
    TransparentHash const& hashFunction = HASH(),
    TransparentEqualTo const& keyEqual = EQUAL(),
    allocator<pair<basic_string<char> const, Json>> const& basicAllocator = ALLOCATOR());