[#BloombergLP-bslstl-HashTable-09-2constructor-0a]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::xref:BloombergLP/bslstl/HashTable-09.adoc[HashTable&lt;UnorderedMapKeyConfiguration&lt;basic&lowbar;string&lt;char&gt; const, pair&lt;basic&lowbar;string&lt;char&gt; const, Json&gt;&gt;, TransparentHash, TransparentEqualTo, allocator&lt;pair&lt;basic&lowbar;string&lt;char&gt; const, Json&gt;&gt;&gt;]::HashTable
:relfileprefix: ../../../
:mrdocs:

Create an empty hash&hyphen;table using the specified `hash` and `compare` functors to organize elements in the table, which will initially have at least the specified `initialNumBuckets` and a `maxLoadFactor` of the specified `initialMaxLoadFactor`&period; Optionally specify a `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 type `ALLOCATOR` is `bsl&colon;&colon;allocator` and `basicAllocator` is not supplied, the currently installed default allocator is used to supply memory&period; If this constructor tries to allocate a number of buckets larger than can be represented by this hash&hyphen;table&apos;s `SizeType`, a `std&colon;&colon;length&lowbar;error` exception is thrown&period; The behavior is undefined unless `0 &lt; initialMaxLoadFactor`&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; Also note that a `bslma&colon;&colon;Allocator &ast;` can be supplied for `basicAllocator` if the type `ALLOCATOR` is `bsl&colon;&colon;allocator` (the default)&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
HashTable(
    xref:BloombergLP/bdlb/TransparentHash.adoc[TransparentHash] const& hash,
    xref:BloombergLP/bdlb/TransparentEqualTo.adoc[TransparentEqualTo] const& compare,
    xref:BloombergLP/bslstl/HashTable-09/SizeType.adoc[SizeType] initialNumBuckets,
    float initialMaxLoadFactor,
    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]#
