insert overloads
Synopses
Declared in <nlohmann/ordered_map.hpp>
inserts an element if the key does not already exist
std::pair<iterator, bool>
insert(value_type const& value);
inserts an element if the key does not already exist
std::pair<iterator, bool>
insert(value_type&& value);
inserts the elements in the range [first, last), skipping keys that already exist]
template<
typename InputIt,
typename = require_input_iter<InputIt>>
void
insert(
InputIt first,
InputIt last);
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 |
first [in] |
iterator to the first element to insert |
last [in] |
iterator past the last element to insert |
Created with MrDocs