[#bsl-unordered_multimap-0b0-insert-0a]
= xref:bsl.adoc[bsl]::xref:bsl/unordered_multimap-0b0.adoc[unordered&lowbar;multimap]::insert
:relfileprefix: ../../
:mrdocs:

`insert` overloads

== Synopses

Declared in `&lt;bslstl&lowbar;unorderedmultimap&period;h&gt;`

Insert into this unordered multimap the value of each `value&lowbar;type` object in the specified `values` initializer list&period; This method requires that the (template parameter) types `KEY` and `VALUE` both be `copy&hyphen;insertable` into this unordered multimap (see &lcub;Requirements on `KEY` and `VALUE`&rcub;)&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:bsl/unordered_multimap-0b0/insert-046.adoc[insert](std::initializer&lowbar;list&lt;value&lowbar;type&gt; values);
----

[.small]#xref:bsl/unordered_multimap-0b0/insert-046.adoc[_» more&period;&period;&period;_]#

Insert the specified `value` into this unordered multimap, and return an iterator referring to the newly inserted `value&lowbar;type` object&period; This method requires that the (template parameter) types `KEY` and `VALUE` both be `copy&hyphen;insertable` into this unordered multimap (see &lcub;Requirements on `KEY` and `VALUE`&rcub;)&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/unordered_multimap-0b0/iterator.adoc[unordered&lowbar;multimap&lt;KEY, VALUE, HASH, EQUAL, ALLOCATOR&gt;::iterator]
xref:bsl/unordered_multimap-0b0/insert-047.adoc[insert](xref:bsl/unordered_multimap-0b0/value_type.adoc[value&lowbar;type] const& value);
----

[.small]#xref:bsl/unordered_multimap-0b0/insert-047.adoc[_» more&period;&period;&period;_]#

Insert into this unordered multimap a `value&lowbar;type` object created from the specified `value`, and return an iterator referring to the newly inserted `value&lowbar;type` object&period; This method requires that the (template parameter) types `KEY` and `VALUE` both be `move&hyphen;insertable` into this unordered multimap (see &lcub;Requirements on `KEY` and `VALUE`&rcub;), and the `value&lowbar;type` be constructible from the (template parameter) `ALT&lowbar;VALUE&lowbar;TYPE`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class ALT&lowbar;VALUE&lowbar;TYPE&gt;
xref:bsl/unordered_multimap-0b0/iterator.adoc[iterator]
xref:bsl/unordered_multimap-0b0/insert-0c.adoc[insert](ALT&lowbar;VALUE&lowbar;TYPE&& value)
requires std&colon;&colon;is&lowbar;constructible&lt;value&lowbar;type,
                                             ALT&lowbar;VALUE&lowbar;TYPE&amp;&amp;&gt;&colon;&colon;value;
----

[.small]#xref:bsl/unordered_multimap-0b0/insert-0c.adoc[_» more&period;&period;&period;_]#

Insert the specified `value` into this unordered multimap (in constant time if the specified `hint` refers to an element in this container with a key equivalent to the key of `value`), and return an iterator referring to the newly inserted `value&lowbar;type` object&period; If `hint` does not refer to an element in this container with a key equivalent to the key of `value`, this operation has worst case `O&lsqb;N&rsqb;` and average case constant&hyphen;time complexity, where `N` is the size of this unordered multimap&period; This method requires that the (template parameter) types `KEY` and `VALUE` both be `copy&hyphen;insertable` into this unordered multimap (see &lcub;Requirements on `KEY` and `VALUE`&rcub;)&period; The behavior is undefined unless `hint` is an iterator in the range `&lsqb;begin() &period;&period; end()&rsqb;` (both endpoints included)&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/unordered_multimap-0b0/iterator.adoc[unordered&lowbar;multimap&lt;KEY, VALUE, HASH, EQUAL, ALLOCATOR&gt;::iterator]
xref:bsl/unordered_multimap-0b0/insert-054.adoc[insert](
    xref:bsl/unordered_multimap-0b0/const_iterator.adoc[const&lowbar;iterator] hint,
    xref:bsl/unordered_multimap-0b0/value_type.adoc[value&lowbar;type] const& value);
----

[.small]#xref:bsl/unordered_multimap-0b0/insert-054.adoc[_» more&period;&period;&period;_]#

Insert into this unordered multimap the value of each `value&lowbar;type` object in the range starting at the specified `first` iterator and ending immediately before the specified `last` iterator&period; The (template parameter) type `INPUT&lowbar;ITERATOR` shall meet the requirements of an input iterator defined in the C&plus;&plus;11 standard &lsqb;24&period;2&period;3&rsqb;providing access to values of a type convertible to `value&lowbar;type`, and `value&lowbar;type` must be `emplace&hyphen;constructible` from `&ast;i` into this unordered multimap, where `i` is a dereferenceable iterator in the range `&lsqb;first &period;&period; last)&rsqb;` (see &lcub;Requirements on `KEY` and `VALUE`&rcub;)&period; The behavior is undefined unless `first` and `last` refer to a sequence of valid values where `first` is at a position at or before `last`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class INPUT&lowbar;ITERATOR&gt;
void
xref:bsl/unordered_multimap-0b0/insert-05e.adoc[insert](
    INPUT&lowbar;ITERATOR first,
    INPUT&lowbar;ITERATOR last);
----

[.small]#xref:bsl/unordered_multimap-0b0/insert-05e.adoc[_» more&period;&period;&period;_]#

Insert into this unordered multimap a `value&lowbar;type` object created from the specified `value` (in constant time if the specified `hint` refers to an element in this container with a key equivalent to the key of `value`), and return an iterator referring to the newly inserted `value&lowbar;type` object&period; If `hint` does not refer to an element in this container with a key equivalent to the key of `value`, this operation has worst case `O&lsqb;N&rsqb;` and average case constant&hyphen;time complexity, where `N` is the size of this unordered multimap&period; This method requires that the (template parameter) types `KEY` and `VALUE` both be `move&hyphen;insertable` into this unordered multimap (see &lcub;Requirements on `KEY` and `VALUE`&rcub;), and the `value&lowbar;type` be constructible from the (template parameter) `ALT&lowbar;VALUE&lowbar;TYPE`&period; The behavior is undefined unless `hint` is an iterator in the range `&lsqb;begin() &period;&period; end()&rsqb;` (both endpoints included)&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class ALT&lowbar;VALUE&lowbar;TYPE&gt;
xref:bsl/unordered_multimap-0b0/iterator.adoc[iterator]
xref:bsl/unordered_multimap-0b0/insert-050.adoc[insert](
    xref:bsl/unordered_multimap-0b0/const_iterator.adoc[const&lowbar;iterator] hint,
    ALT&lowbar;VALUE&lowbar;TYPE&& value)
requires std&colon;&colon;is&lowbar;constructible&lt;value&lowbar;type,
                                             ALT&lowbar;VALUE&lowbar;TYPE&amp;&amp;&gt;&colon;&colon;value;
----

[.small]#xref:bsl/unordered_multimap-0b0/insert-050.adoc[_» more&period;&period;&period;_]#


[.small]#Created with https://www.mrdocs.com[MrDocs]#
