[#nlohmann-ordered_map-2constructor-03]
= xref:nlohmann.adoc[nlohmann]::xref:nlohmann/ordered_map.adoc[ordered&lowbar;map]::ordered&lowbar;map
:relfileprefix: ../../
:mrdocs:

Constructors

== Synopses

Declared in `&lt;nlohmann&sol;ordered&lowbar;map&period;hpp&gt;`

constructs an empty ordered&lowbar;map


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:nlohmann/ordered_map/2constructor-0d.adoc[ordered&lowbar;map]() noexcept(noexcept(Container()));
----

[.small]#xref:nlohmann/ordered_map/2constructor-0d.adoc[_» more&period;&period;&period;_]#

copy constructor


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:nlohmann/ordered_map/2constructor-0f.adoc[ordered&lowbar;map](xref:nlohmann/ordered_map.adoc[ordered&lowbar;map] const& other) = default;
----

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

move constructor


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:nlohmann/ordered_map/2constructor-01.adoc[ordered&lowbar;map](xref:nlohmann/ordered_map.adoc[ordered&lowbar;map]&& other) noexcept(&sol;&ast; see-below &ast;&sol;) = default;
----

[.small]#xref:nlohmann/ordered_map/2constructor-01.adoc[_» more&period;&period;&period;_]#

constructs an empty ordered&lowbar;map using the given allocator


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:nlohmann/ordered_map/2constructor-04.adoc[ordered&lowbar;map](Allocator const& alloc) noexcept(noexcept(Container(alloc)));
----

[.small]#xref:nlohmann/ordered_map/2constructor-04.adoc[_» more&period;&period;&period;_]#

constructs an ordered&lowbar;map from an initializer list of key&hyphen;value pairs


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:nlohmann/ordered_map/2constructor-09.adoc[ordered&lowbar;map](
    std::initializer&lowbar;list&lt;value&lowbar;type&gt; init,
    Allocator const& alloc = Allocator());
----

[.small]#xref:nlohmann/ordered_map/2constructor-09.adoc[_» more&period;&period;&period;_]#

constructs an ordered&lowbar;map with the elements in the range &lsqb;first, last)&rsqb;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class It&gt;
xref:nlohmann/ordered_map/2constructor-07.adoc[ordered&lowbar;map](
    It first,
    It last,
    Allocator const& alloc = Allocator());
----

[.small]#xref:nlohmann/ordered_map/2constructor-07.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *other* [in]
| ordered&lowbar;map to copy from
| *alloc* [in]
| allocator to use for the underlying container
| *init* [in]
| initializer list of key&hyphen;value pairs to insert
| *first* [in]
| iterator to the first element to insert
| *last* [in]
| iterator past the last element to insert
|===


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