[#bsl-multiset-03-insert-07] = xref:bsl.adoc[bsl]::xref:bsl/multiset-03.adoc[multiset]::insert :relfileprefix: ../../ :mrdocs: `insert` overloads == Synopses Declared in `<bslstl_multiset.h>` Insert the specified `value` into this multiset. If a range containing elements equivalent to `value` already exists in this multiset, insert `value` at the end of that range. `value` is left in a valid but unspecified state. Return an iterator referring to the newly inserted `value_type` object in this multiset that is equivalent to `value`. This method requires that the (template parameter) type `KEY` be `move‐insertable` into this multiset (see {Requirements on `KEY`}). [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/multiset-03/iterator.adoc[multiset<KEY, COMPARATOR, ALLOCATOR>::iterator] xref:bsl/multiset-03/insert-084.adoc[insert](xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef<value_type>] value); ---- [.small]#xref:bsl/multiset-03/insert-084.adoc[_» more..._]# Insert into this multiset the value of each `value_type` object in the specified `values` initializer list. This method requires that the (template parameter) type `KEY` be `copy‐insertable` into this multiset (see {Requirements on `KEY`}). [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void xref:bsl/multiset-03/insert-049.adoc[insert](std::initializer_list<KEY> values); ---- [.small]#xref:bsl/multiset-03/insert-049.adoc[_» more..._]# Insert the specified `value` into this multiset. If a range containing elements equivalent to `value` already exists, insert the `value` at the end of that range. Return an iterator referring to the newly inserted `value_type` object. This method requires that the (template parameter) type `KEY` be `copy‐insertable` into this multiset (see {Requirements on `KEY`}). [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/multiset-03/iterator.adoc[multiset<KEY, COMPARATOR, ALLOCATOR>::iterator] xref:bsl/multiset-03/insert-081.adoc[insert](xref:bsl/multiset-03/value_type.adoc[value_type] const& value); ---- [.small]#xref:bsl/multiset-03/insert-081.adoc[_» more..._]# Insert the specified `value` into this multiset (in amortized constant time if the specified `hint` is a valid immediate successor to `value`). `value` is left in a valid but unspecified state. Return an iterator referring to the newly inserted `value_type` object in this multiset that is equivalent to `value`. If `hint` is not a valid immediate successor to `value`, this operation has `O[log(N)]` complexity, where `N` is the size of this multiset. This method requires that the (template parameter) type `KEY` be `move‐insertable` into this multiset (see {Requirements on `KEY`}). The behavior is undefined unless `hint` is an iterator in the range `[begin() .. end()]` (both endpoints included). [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/multiset-03/iterator.adoc[multiset<KEY, COMPARATOR, ALLOCATOR>::iterator] xref:bsl/multiset-03/insert-0a.adoc[insert]( xref:bsl/multiset-03/const_iterator.adoc[const_iterator] hint, xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef<value_type>] value); ---- [.small]#xref:bsl/multiset-03/insert-0a.adoc[_» more..._]# Insert the specified `value` into this multiset (in amortized constant time if the specified `hint` is a valid immediate successor to `value`). Return an iterator referring to the newly inserted `value_type` object in this multiset that is equivalent to `value`. If `hint` is not a valid immediate successor to `value`, this operation has `O[log(N)]` complexity, where `N` is the size of this multiset. This method requires that the (template parameter) type `KEY` be `copy‐insertable` into this multiset (see {Requirements on `KEY`}). The behavior is undefined unless `hint` is an iterator in the range `[begin() .. end()]` (both endpoints included). [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/multiset-03/iterator.adoc[multiset<KEY, COMPARATOR, ALLOCATOR>::iterator] xref:bsl/multiset-03/insert-040.adoc[insert]( xref:bsl/multiset-03/const_iterator.adoc[const_iterator] hint, xref:bsl/multiset-03/value_type.adoc[value_type] const& value); ---- [.small]#xref:bsl/multiset-03/insert-040.adoc[_» more..._]# Insert into this multiset the value of each `value_type` object in the range starting at the specified `first` iterator and ending immediately before the specified `last` iterator. The (template parameter) type `INPUT_ITERATOR` shall meet the requirements of an input iterator defined in the C++11 standard [24.2.3]providing access to values of a type convertible to `value_type`, and `value_type` must be `emplace‐constructible` from `*i` into this multiset, where `i` is a dereferenceable iterator in the range `[first .. last)]` (see {Requirements on `KEY`}). 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`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class INPUT_ITERATOR> void xref:bsl/multiset-03/insert-0e.adoc[insert]( INPUT_ITERATOR first, INPUT_ITERATOR last); ---- [.small]#xref:bsl/multiset-03/insert-0e.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#