[#bsl-map-0a7-2constructor-0bc]
= xref:bsl.adoc[bsl]::xref:bsl/map-0a7.adoc[map]::map
:relfileprefix: ../../
:mrdocs:

Constructors

== Synopses

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

Create an empty map&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/map-0a7/2constructor-098.adoc[map]();
----

[.small]#xref:bsl/map-0a7/2constructor-098.adoc[_» more&period;&period;&period;_]#

Create a map with the same value as `original`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/map-0a7/2constructor-06.adoc[map](xref:bsl/map-0a7.adoc[map] const& original);
----

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

Create a map by moving from `original`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/map-0a7/2constructor-0e.adoc[map](xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;map&gt;] original);
----

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

Create an empty map that uses `basicAllocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:bsl/map-0a7/2constructor-0c.adoc[map](ALLOCATOR const& basicAllocator);
----

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

Create a map by moving from `original` using `basicAllocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/map-0a7/2constructor-008.adoc[map](
    xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;map&gt;] original,
    ALLOCATOR const& basicAllocator);
----

[.small]#xref:bsl/map-0a7/2constructor-008.adoc[_» more&period;&period;&period;_]#

Create a map from `values` using `basicAllocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/map-0a7/2constructor-090.adoc[map](
    std::initializer&lowbar;list&lt;value&lowbar;type&gt; values,
    ALLOCATOR const& basicAllocator);
----

[.small]#xref:bsl/map-0a7/2constructor-090.adoc[_» more&period;&period;&period;_]#

Create an empty map using `comparator` and `basicAllocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:bsl/map-0a7/2constructor-01a.adoc[map](
    COMPARATOR const& comparator,
    ALLOCATOR const& basicAllocator = ALLOCATOR());
----

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

Create a map with the value of `original` using `basicAllocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/map-0a7/2constructor-016.adoc[map](
    xref:bsl/map-0a7.adoc[map] const& original,
    ALLOCATOR const& basicAllocator);
----

[.small]#xref:bsl/map-0a7/2constructor-016.adoc[_» more&period;&period;&period;_]#

Create a map from `values`, optionally with comparator and allocator&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/map-0a7/2constructor-0ba.adoc[map](
    std::initializer&lowbar;list&lt;value&lowbar;type&gt; values,
    COMPARATOR const& comparator = COMPARATOR(),
    ALLOCATOR const& basicAllocator = ALLOCATOR());
----

[.small]#xref:bsl/map-0a7/2constructor-0ba.adoc[_» more&period;&period;&period;_]#

Create a map from `&lsqb;first, last)&rsqb;` using `basicAllocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class INPUT&lowbar;ITERATOR&gt;
xref:bsl/map-0a7/2constructor-0f.adoc[map](
    INPUT&lowbar;ITERATOR first,
    INPUT&lowbar;ITERATOR last,
    ALLOCATOR const& basicAllocator);
----

[.small]#xref:bsl/map-0a7/2constructor-0f.adoc[_» more&period;&period;&period;_]#

Create a map from `range` using `basicAllocator`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class RANGE&gt;
xref:bsl/map-0a7/2constructor-03.adoc[map](
    std::from&lowbar;range&lowbar;t tag,
    RANGE&& range,
    ALLOCATOR const& basicAllocator);
----

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

Create a map from `&lsqb;first, last)&rsqb;`, optionally with comparator and allocator&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class INPUT&lowbar;ITERATOR&gt;
xref:bsl/map-0a7/2constructor-0a.adoc[map](
    INPUT&lowbar;ITERATOR first,
    INPUT&lowbar;ITERATOR last,
    COMPARATOR const& comparator = COMPARATOR(),
    ALLOCATOR const& basicAllocator = ALLOCATOR());
----

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

Create a map from `range`, optionally with comparator and allocator&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class RANGE&gt;
xref:bsl/map-0a7/2constructor-001.adoc[map](
    std::from&lowbar;range&lowbar;t tag,
    RANGE&& range,
    COMPARATOR const& comparator = COMPARATOR(),
    ALLOCATOR const& basicAllocator = ALLOCATOR());
----

[.small]#xref:bsl/map-0a7/2constructor-001.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *original*
| map to copy
| *basicAllocator*
| allocator used to supply memory
| *values*
| initializer list of elements to insert
| *comparator*
| functor used to order keys
| *first*
| beginning of the range to copy
| *last*
| end of the range to copy
| *tag*
| disambiguation tag for range construction
| *range*
| input range of elements to insert
|===


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