[#nlohmann-ordered_map-insert-0e] = xref:nlohmann.adoc[nlohmann]::xref:nlohmann/ordered_map.adoc[ordered_map]::insert :relfileprefix: ../../ :mrdocs: `insert` overloads == Synopses Declared in `<nlohmann/ordered_map.hpp>` inserts an element if the key does not already exist [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- std::pair<iterator, bool> xref:nlohmann/ordered_map/insert-0d.adoc[insert](xref:nlohmann/ordered_map/value_type.adoc[value_type] const& value); ---- [.small]#xref:nlohmann/ordered_map/insert-0d.adoc[_» more..._]# inserts an element if the key does not already exist [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- std::pair<iterator, bool> xref:nlohmann/ordered_map/insert-05.adoc[insert](xref:nlohmann/ordered_map/value_type.adoc[value_type]&& value); ---- [.small]#xref:nlohmann/ordered_map/insert-05.adoc[_» more..._]# inserts the elements in the range [first, last), skipping keys that already exist] [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< typename InputIt, typename = xref:nlohmann/ordered_map/require_input_iter.adoc[require_input_iter<InputIt>]> void xref:nlohmann/ordered_map/insert-09.adoc[insert]( InputIt first, InputIt last); ---- [.small]#xref:nlohmann/ordered_map/insert-09.adoc[_» more..._]# == Return Value pair of an iterator to the (possibly pre‐existing) element and a bool that is true if the insertion took place == Parameters [cols="1,4"] |=== | 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 |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#