[#bsl-unordered_map-0bf-2constructor-042]
= xref:bsl.adoc[bsl]::xref:bsl/unordered_map-0bf.adoc[unordered&lowbar;map&lt;basic&lowbar;string&lt;char&gt;, Json, TransparentHash, TransparentEqualTo&gt;]::unordered&lowbar;map
:relfileprefix: ../../
:mrdocs:

Create an empty unordered map having a `max&lowbar;load&lowbar;factor` of 1&period;0&period; Optionally specify an `initialNumBuckets` indicating the minimum initial size of the array of buckets of this unordered map&period; If `initialNumBuckets` is not supplied, one empty bucket shall be used and no memory allocated&period; Optionally specify a `hashFunction` used to generate the hash values associated with the `KEY&hyphen;VALUE` pairs contained in this unordered map&period; If `hashFunction` is not supplied, a default&hyphen;constructed object of the (template parameter) type `HASH` is used&period; Optionally specify a key&hyphen;equality functor `keyEqual` used to determine whether two keys are equivalent&period; If `keyEqual` is not supplied, a default&hyphen;constructed object of the (template parameter) type `EQUAL` is used&period; Optionally specify the `basicAllocator` used to supply memory&period; If `basicAllocator` is not supplied, a default&hyphen;constructed object of the (template parameter) type `ALLOCATOR` is used&period; If the `ALLOCATOR` type is `bsl&colon;&colon;allocator` (the default), then `basicAllocator` shall be convertible to `bslma&colon;&colon;Allocator &ast;`&period; If the `ALLOCATOR` type is `bsl&colon;&colon;allocator` and `basicAllocator` is not supplied, the currently installed default allocator is used to supply memory&period; Note that more than `initialNumBuckets` buckets may be created in order to preserve the bucket allocation strategy of the hash&hyphen;table (but never fewer)&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;unorderedmap&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
unordered&lowbar;map(
    xref:bsl/unordered_map-0bf/size_type.adoc[size&lowbar;type] initialNumBuckets,
    xref:BloombergLP/bdlb/TransparentHash.adoc[TransparentHash] const& hashFunction = HASH(),
    xref:BloombergLP/bdlb/TransparentEqualTo.adoc[TransparentEqualTo] const& keyEqual = EQUAL(),
    xref:bsl/allocator-0df.adoc[allocator&lt;pair&lt;basic&lowbar;string&lt;char&gt; const, Json&gt;&gt;] const& basicAllocator = ALLOCATOR());
----


[.small]#Created with https://www.mrdocs.com[MrDocs]#
