[#bsl-unordered_map-0bf-2constructor-0b0]
= 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:

Constructors

== Synopses

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

Same as the preceding overload&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/unordered_map-0bf/2constructor-0e.adoc[unordered&lowbar;map]();
----

[.small]#xref:bsl/unordered_map-0bf/2constructor-0e.adoc[_» more&period;&period;&period;_]#

Create an unordered map having the same value as the specified `original` object by moving (in constant time) the contents of `original` to the new unordered map&period; Use a copy of `original&period;hash&lowbar;function()` to generate hash values for the keys contained in this unordered map&period; Use a copy of `original&period;key&lowbar;eq()` to verify that two keys are equivalent&period; The allocator associated with `original` is propagated for use in the newly&hyphen;created unordered map&period; `original` is left in a valid but unspecified state&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/unordered_map-0bf/2constructor-044.adoc[unordered&lowbar;map](xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;unordered&lowbar;map&lt;basic&lowbar;string&lt;char&gt;, Json, TransparentHash, TransparentEqualTo&gt;&gt;] original);
----

[.small]#xref:bsl/unordered_map-0bf/2constructor-044.adoc[_» more&period;&period;&period;_]#

Same as the preceding overload&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:bsl/unordered_map-0bf/2constructor-0b8.adoc[unordered&lowbar;map](xref:bsl/allocator-0df.adoc[allocator&lt;pair&lt;basic&lowbar;string&lt;char&gt; const, Json&gt;&gt;] const& basicAllocator);
----

[.small]#xref:bsl/unordered_map-0bf/2constructor-0b8.adoc[_» more&period;&period;&period;_]#

Create an unordered map having the same value, hasher, key&hyphen;equality comparator, and `max&lowbar;load&lowbar;factor` as the specified `original`&period; Use the allocator returned by &apos;bsl&colon;&colon;allocator&lowbar;traits&lt;ALLOCATOR&gt;&colon;&colon; select&lowbar;on&lowbar;container&lowbar;copy&lowbar;construction(original&period;get&lowbar;allocator())&apos; to supply memory&period; If the `ALLOCATOR` type is `bsl&colon;&colon;allocator` (the default), the currently installed default allocator is used to supply memory&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/unordered_map-0bf/2constructor-06e.adoc[unordered&lowbar;map](xref:bsl/unordered_map-02b.adoc[unordered&lowbar;map&lt;basic&lowbar;string&lt;char&gt;, Json, TransparentHash, TransparentEqualTo&gt;] const& original);
----

[.small]#xref:bsl/unordered_map-0bf/2constructor-06e.adoc[_» more&period;&period;&period;_]#

Same as the preceding overload&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/unordered_map-0bf/2constructor-061.adoc[unordered&lowbar;map](
    xref:bsl/unordered_map-0bf/size_type.adoc[size&lowbar;type] initialNumBuckets,
    xref:bsl/allocator-0df.adoc[allocator&lt;pair&lt;basic&lowbar;string&lt;char&gt; const, Json&gt;&gt;] const& basicAllocator);
----

[.small]#xref:bsl/unordered_map-0bf/2constructor-061.adoc[_» more&period;&period;&period;_]#

Create an unordered map having the same value, hasher, key&hyphen;equality comparator, and `max&lowbar;load&lowbar;factor` as the specified `original`&period; Use the specified `basicAllocator` to supply memory&period; This method requires that the (template parameter) type `value&lowbar;type` be `move&hyphen;insertable` into this `unordered&lowbar;map` (see &lcub;Requirements on `value&lowbar;type`&rcub;)&period; Note that a `bslma&colon;&colon;Allocator &ast;` can be supplied for `basicAllocator` if the (template parameter) `ALLOCATOR` type is `bsl&colon;&colon;allocator` (the default)&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/unordered_map-0bf/2constructor-01.adoc[unordered&lowbar;map](
    xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;unordered&lowbar;map&lt;basic&lowbar;string&lt;char&gt;, Json, TransparentHash, TransparentEqualTo&gt;&gt;] original,
    type&lowbar;identity&lt;allocator&lt;pair&lt;basic&lowbar;string&lt;char&gt; const, Json&gt;&gt;&gt;::type const& basicAllocator);
----

[.small]#xref:bsl/unordered_map-0bf/2constructor-01.adoc[_» more&period;&period;&period;_]#

Create an unordered map having the same value, hasher, key&hyphen;equality comparator, and `max&lowbar;load&lowbar;factor` as the specified `original`, and using the specified `basicAllocator` to supply memory&period; If the `ALLOCATOR` type is `bsl&colon;&colon;allocator` (the default), then `basicAllocator` shall be convertible to `bslma&colon;&colon;Allocator &ast;`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/unordered_map-0bf/2constructor-05a.adoc[unordered&lowbar;map](
    xref:bsl/unordered_map-02b.adoc[unordered&lowbar;map&lt;basic&lowbar;string&lt;char&gt;, Json, TransparentHash, TransparentEqualTo&gt;] const& original,
    type&lowbar;identity&lt;allocator&lt;pair&lt;basic&lowbar;string&lt;char&gt; const, Json&gt;&gt;&gt;::type const& basicAllocator);
----

[.small]#xref:bsl/unordered_map-0bf/2constructor-05a.adoc[_» more&period;&period;&period;_]#

Same as the preceding overload&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;&gt;
requires bsl&colon;&colon;IsStdAllocator&lowbar;v&lt;ALLOCATOR&gt;
xref:bsl/unordered_map-0bf/2constructor-02f1.adoc[unordered&lowbar;map](
    std::initializer&lowbar;list&lt;value&lowbar;type&gt; values,
    xref:bsl/allocator-0df.adoc[allocator&lt;pair&lt;basic&lowbar;string&lt;char&gt; const, Json&gt;&gt;] const& basicAllocator);
----

[.small]#xref:bsl/unordered_map-0bf/2constructor-02f1.adoc[_» more&period;&period;&period;_]#

Same as the preceding overload&period;


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

[.small]#xref:bsl/unordered_map-0bf/2constructor-052.adoc[_» more&period;&period;&period;_]#

Same as the preceding overload&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;&gt;
requires bsl&colon;&colon;IsStdAllocator&lowbar;v&lt;ALLOCATOR&gt;
xref:bsl/unordered_map-0bf/2constructor-02f9.adoc[unordered&lowbar;map](
    std::initializer&lowbar;list&lt;value&lowbar;type&gt; values,
    xref:bsl/unordered_map-0bf/size_type.adoc[size&lowbar;type] initialNumBuckets,
    xref:bsl/allocator-0df.adoc[allocator&lt;pair&lt;basic&lowbar;string&lt;char&gt; const, Json&gt;&gt;] const& basicAllocator);
----

[.small]#xref:bsl/unordered_map-0bf/2constructor-02f9.adoc[_» more&period;&period;&period;_]#

Same as the preceding overload&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class INPUT&lowbar;ITERATOR&gt;
xref:bsl/unordered_map-0bf/2constructor-03.adoc[unordered&lowbar;map](
    INPUT&lowbar;ITERATOR first,
    INPUT&lowbar;ITERATOR last,
    xref:bsl/allocator-0df.adoc[allocator&lt;pair&lt;basic&lowbar;string&lt;char&gt; const, Json&gt;&gt;] const& basicAllocator);
----

[.small]#xref:bsl/unordered_map-0bf/2constructor-03.adoc[_» more&period;&period;&period;_]#

Same as the preceding overload&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class RANGE&gt;
xref:bsl/unordered_map-0bf/2constructor-06a.adoc[unordered&lowbar;map](
    std::from&lowbar;range&lowbar;t,
    RANGE&& range,
    xref:bsl/allocator-0df.adoc[allocator&lt;pair&lt;basic&lowbar;string&lt;char&gt; const, Json&gt;&gt;] const& basicAllocator);
----

[.small]#xref:bsl/unordered_map-0bf/2constructor-06a.adoc[_» more&period;&period;&period;_]#

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;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:bsl/unordered_map-0bf/2constructor-042.adoc[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]#xref:bsl/unordered_map-0bf/2constructor-042.adoc[_» more&period;&period;&period;_]#

Same as the preceding overload&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;&gt;
requires std&colon;&colon;is&lowbar;invocable&lowbar;v&lt;HASH, const KEY &amp;&gt; &amp;&amp; bsl&colon;&colon;IsStdAllocator&lowbar;v&lt;ALLOCATOR&gt;
xref:bsl/unordered_map-0bf/2constructor-08.adoc[unordered&lowbar;map](
    std::initializer&lowbar;list&lt;value&lowbar;type&gt; values,
    xref:bsl/unordered_map-0bf/size_type.adoc[size&lowbar;type] initialNumBuckets,
    xref:BloombergLP/bdlb/TransparentHash.adoc[TransparentHash] const& hashFunction,
    xref:bsl/allocator-0df.adoc[allocator&lt;pair&lt;basic&lowbar;string&lt;char&gt; const, Json&gt;&gt;] const& basicAllocator);
----

[.small]#xref:bsl/unordered_map-0bf/2constructor-08.adoc[_» more&period;&period;&period;_]#

Same as the preceding overload&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class INPUT&lowbar;ITERATOR&gt;
xref:bsl/unordered_map-0bf/2constructor-02e.adoc[unordered&lowbar;map](
    INPUT&lowbar;ITERATOR first,
    INPUT&lowbar;ITERATOR last,
    xref:bsl/unordered_map-0bf/size_type.adoc[size&lowbar;type] initialNumBuckets,
    xref:bsl/allocator-0df.adoc[allocator&lt;pair&lt;basic&lowbar;string&lt;char&gt; const, Json&gt;&gt;] const& basicAllocator);
----

[.small]#xref:bsl/unordered_map-0bf/2constructor-02e.adoc[_» more&period;&period;&period;_]#

Same as the preceding overload&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class RANGE&gt;
xref:bsl/unordered_map-0bf/2constructor-024.adoc[unordered&lowbar;map](
    std::from&lowbar;range&lowbar;t,
    RANGE&& range,
    xref:bsl/unordered_map-0bf/size_type.adoc[size&lowbar;type] initialNumBuckets,
    xref:bsl/allocator-0df.adoc[allocator&lt;pair&lt;basic&lowbar;string&lt;char&gt; const, Json&gt;&gt;] const& basicAllocator);
----

[.small]#xref:bsl/unordered_map-0bf/2constructor-024.adoc[_» more&period;&period;&period;_]#

Create an empty unordered map, having a `max&lowbar;load&lowbar;factor` of 1&period;0, and then create a `value&lowbar;type` object for each element in the specified `values` list, ignoring those having a key that appears earlier in the sequence&period; Optionally specify a minimum `initialNumBuckets`, `hashFunction`, `keyEqual`, and `basicAllocator` as for the range constructor&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;&gt;
requires std&colon;&colon;is&lowbar;invocable&lowbar;v&lt;HASH, const KEY &amp;&gt; &amp;&amp; std&colon;&colon;is&lowbar;invocable&lowbar;v&lt;EQUAL, const KEY &amp;, const KEY &amp;&gt; &amp;&amp; bsl&colon;&colon;IsStdAllocator&lowbar;v&lt;ALLOCATOR&gt;
xref:bsl/unordered_map-0bf/2constructor-09.adoc[unordered&lowbar;map](
    std::initializer&lowbar;list&lt;value&lowbar;type&gt; values,
    xref:bsl/unordered_map-0bf/size_type.adoc[size&lowbar;type] initialNumBuckets = 0,
    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]#xref:bsl/unordered_map-0bf/2constructor-09.adoc[_» more&period;&period;&period;_]#

Same as the preceding overload&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class INPUT&lowbar;ITERATOR&gt;
xref:bsl/unordered_map-0bf/2constructor-02c.adoc[unordered&lowbar;map](
    INPUT&lowbar;ITERATOR first,
    INPUT&lowbar;ITERATOR last,
    xref:bsl/unordered_map-0bf/size_type.adoc[size&lowbar;type] initialNumBuckets,
    xref:BloombergLP/bdlb/TransparentHash.adoc[TransparentHash] const& hashFunction,
    xref:bsl/allocator-0df.adoc[allocator&lt;pair&lt;basic&lowbar;string&lt;char&gt; const, Json&gt;&gt;] const& basicAllocator);
----

[.small]#xref:bsl/unordered_map-0bf/2constructor-02c.adoc[_» more&period;&period;&period;_]#

Same as the preceding overload&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class RANGE&gt;
xref:bsl/unordered_map-0bf/2constructor-0b7.adoc[unordered&lowbar;map](
    std::from&lowbar;range&lowbar;t,
    RANGE&& range,
    xref:bsl/unordered_map-0bf/size_type.adoc[size&lowbar;type] initialNumBuckets,
    xref:BloombergLP/bdlb/TransparentHash.adoc[TransparentHash] const& hashFunction,
    xref:bsl/allocator-0df.adoc[allocator&lt;pair&lt;basic&lowbar;string&lt;char&gt; const, Json&gt;&gt;] const& basicAllocator);
----

[.small]#xref:bsl/unordered_map-0bf/2constructor-0b7.adoc[_» more&period;&period;&period;_]#

Create an empty unordered map, having a `max&lowbar;load&lowbar;factor` of 1&period;0, and then create a `value&lowbar;type` object for each iterator in the range starting at the specified `first` iterator and ending immediately before the specified `last` iterator, by converting from the object referred to by each iterator&period; Insert into this unordered map each such object, ignoring those having a key that appears earlier in the sequence&period; Optionally specify a minimum `initialNumBuckets` indicating the minimum initial size of the array of buckets of this unordered map&period; If `initialNumBuckets` is 0 or not supplied, and `first` and `last` denote an empty range, a single empty bucket shall be supplied&period; The actual number of buckets the unordered&lowbar;map is created with shall always be enough to accommodate the number of elements of the range without exceeding the `max&lowbar;load&lowbar;factor`&period; Optionally specify a `hashFunction` used to generate 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 verify that 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 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 `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; The (template parameter) type `INPUT&lowbar;ITERATOR` shall meet the requirements of an input iterator defined in the C&plus;&plus;11 standard &lsqb;24&period;2&period;3&rsqb;providing access to values of a type convertible to `value&lowbar;type`&period; The behavior is undefined unless `first` and `last` refer to a sequence of valid values where `first` is at a position at or before `last`&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;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class INPUT&lowbar;ITERATOR&gt;
xref:bsl/unordered_map-0bf/2constructor-023.adoc[unordered&lowbar;map](
    INPUT&lowbar;ITERATOR first,
    INPUT&lowbar;ITERATOR last,
    xref:bsl/unordered_map-0bf/size_type.adoc[size&lowbar;type] initialNumBuckets = 0,
    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]#xref:bsl/unordered_map-0bf/2constructor-023.adoc[_» more&period;&period;&period;_]#

Create an unordered set, and insert each `value&lowbar;type` object in the specified `range`, ignoring those keys having a key equivalent to that which appears earlier in the `range`&period; Optionally specify an `initialNumBuckets` indicating the initial size of the array of buckets of this container&period; If `initialNumBuckets` is not supplied, an implementation&hyphen;defined value is used&period; Optionally specify a `hashFunction` used to generate the hash values for each key value contained in this set&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 have the same value&period; If `keyEqual` is not supplied, a default&hyphen;constructed object of the (template parameter) type `EQUAL` is used&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` (the default), then `basicAllocator`, if supplied, shall be convertible to `bslma&colon;&colon;Allocator &ast;`&period; If the type `ALLOCATOR` is `bsl&colon;&colon;allocator` and `basicAllocator` is not supplied, the currently installed default allocator is used&period; This operation has `O&lsqb;N&rsqb;` complexity, where `N` is the number of elements in `range`&period; 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&lowbar;type`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class RANGE&gt;
xref:bsl/unordered_map-0bf/2constructor-066.adoc[unordered&lowbar;map](
    std::from&lowbar;range&lowbar;t,
    RANGE&& range,
    xref:bsl/unordered_map-0bf/size_type.adoc[size&lowbar;type] initialNumBuckets = 0,
    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]#xref:bsl/unordered_map-0bf/2constructor-066.adoc[_» more&period;&period;&period;_]#


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