nlohmann::ordered_map::ordered_map

Constructors

Synopses

Declared in <nlohmann/ordered_map.hpp>

constructs an empty ordered_map

ordered_map() noexcept(noexcept(Container()));
» more...

copy constructor

ordered_map(ordered_map const& other) = default;
» more...

move constructor

ordered_map(ordered_map&& other) noexcept(/* see-below */) = default;
» more...

constructs an empty ordered_map using the given allocator

explicit
ordered_map(Allocator const& alloc) noexcept(noexcept(Container(alloc)));
» more...

constructs an ordered_map from an initializer list of key-value pairs

ordered_map(
    std::initializer_list<value_type> init,
    Allocator const& alloc = Allocator());
» more...

constructs an ordered_map with the elements in the range [first, last)]

template<class It>
ordered_map(
    It first,
    It last,
    Allocator const& alloc = Allocator());
» more...

Parameters

NameDescription
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