[#nlohmann-ordered_map-2constructor-03] = xref:nlohmann.adoc[nlohmann]::xref:nlohmann/ordered_map.adoc[ordered_map]::ordered_map :relfileprefix: ../../ :mrdocs: Constructors == Synopses Declared in `<nlohmann/ordered_map.hpp>` constructs an empty ordered_map [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:nlohmann/ordered_map/2constructor-0d.adoc[ordered_map]() noexcept(noexcept(Container())); ---- [.small]#xref:nlohmann/ordered_map/2constructor-0d.adoc[_» more..._]# copy constructor [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:nlohmann/ordered_map/2constructor-0f.adoc[ordered_map](xref:nlohmann/ordered_map.adoc[ordered_map] const& other) = default; ---- [.small]#xref:nlohmann/ordered_map/2constructor-0f.adoc[_» more..._]# move constructor [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:nlohmann/ordered_map/2constructor-01.adoc[ordered_map](xref:nlohmann/ordered_map.adoc[ordered_map]&& other) noexcept(/* see-below */) = default; ---- [.small]#xref:nlohmann/ordered_map/2constructor-01.adoc[_» more..._]# constructs an empty ordered_map using the given allocator [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- explicit xref:nlohmann/ordered_map/2constructor-04.adoc[ordered_map](Allocator const& alloc) noexcept(noexcept(Container(alloc))); ---- [.small]#xref:nlohmann/ordered_map/2constructor-04.adoc[_» more..._]# constructs an ordered_map from an initializer list of key‐value pairs [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:nlohmann/ordered_map/2constructor-09.adoc[ordered_map]( std::initializer_list<value_type> init, Allocator const& alloc = Allocator()); ---- [.small]#xref:nlohmann/ordered_map/2constructor-09.adoc[_» more..._]# constructs an ordered_map with the elements in the range [first, last)] [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class It> xref:nlohmann/ordered_map/2constructor-07.adoc[ordered_map]( It first, It last, Allocator const& alloc = Allocator()); ---- [.small]#xref:nlohmann/ordered_map/2constructor-07.adoc[_» more..._]# == Parameters [cols="1,4"] |=== | Name| Description | *other* [in] | ordered_map to copy from | *alloc* [in] | allocator to use for the underlying container | *init* [in] | initializer list of key‐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]#