inserts an element if the key does not already exist

Synopsis

Declared in <nlohmann/ordered_map.hpp>

std::pair<iterator, bool>
insert(value_type const& value);

Return Value

pair of an iterator to the (possibly pre‐existing) element and a bool that is true if the insertion took place

Parameters

Name

Description

value [in]

key‐value pair to insert

Created with MrDocs