[#bsl-set-0d-insert-00a] = xref:bsl.adoc[bsl]::xref:bsl/set-0d.adoc[set]::insert :relfileprefix: ../../ :mrdocs: `insert` overloads == Synopses Declared in `<bslstl_set.h>` Move‐insert `value` if an equivalent key is not already present. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/pair-0b.adoc[pair<set<KEY, COMPARATOR, ALLOCATOR>::iterator, bool>] xref:bsl/set-0d/insert-08.adoc[insert](xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef<value_type>] value); ---- [.small]#xref:bsl/set-0d/insert-08.adoc[_» more..._]# Insert each unique value from the `values` initializer list. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void xref:bsl/set-0d/insert-0a.adoc[insert](std::initializer_list<KEY> values); ---- [.small]#xref:bsl/set-0d/insert-0a.adoc[_» more..._]# Insert `value` if an equivalent key is not already present. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/pair-0b.adoc[pair<set<KEY, COMPARATOR, ALLOCATOR>::iterator, bool>] xref:bsl/set-0d/insert-06e.adoc[insert](xref:bsl/set-0d/value_type.adoc[value_type] const& value); ---- [.small]#xref:bsl/set-0d/insert-06e.adoc[_» more..._]# Insert a transparent `value` if an equivalent key is not present. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class LOOKUP_KEY> xref:bsl/pair-0b.adoc[pair<iterator, bool>] xref:bsl/set-0d/insert-00c.adoc[insert](LOOKUP_KEY&& value) requires BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR, LOOKUP_KEY>::value; ---- [.small]#xref:bsl/set-0d/insert-00c.adoc[_» more..._]# Move‐insert `value` near `hint` if an equivalent key is not present. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/set-0d/iterator.adoc[set<KEY, COMPARATOR, ALLOCATOR>::iterator] xref:bsl/set-0d/insert-058.adoc[insert]( xref:bsl/set-0d/const_iterator.adoc[const_iterator] hint, xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef<value_type>] value); ---- [.small]#xref:bsl/set-0d/insert-058.adoc[_» more..._]# Insert `value` near `hint` if an equivalent key is not present. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/set-0d/iterator.adoc[set<KEY, COMPARATOR, ALLOCATOR>::iterator] xref:bsl/set-0d/insert-060.adoc[insert]( xref:bsl/set-0d/const_iterator.adoc[const_iterator] hint, xref:bsl/set-0d/value_type.adoc[value_type] const& value); ---- [.small]#xref:bsl/set-0d/insert-060.adoc[_» more..._]# Insert each unique value from the range `[first .. last)]`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class INPUT_ITERATOR> void xref:bsl/set-0d/insert-050.adoc[insert]( INPUT_ITERATOR first, INPUT_ITERATOR last); ---- [.small]#xref:bsl/set-0d/insert-050.adoc[_» more..._]# Insert a transparent `value` near `hint` if not already present. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class LOOKUP_KEY> xref:bsl/set-0d/iterator.adoc[iterator] xref:bsl/set-0d/insert-0e.adoc[insert]( xref:bsl/set-0d/const_iterator.adoc[const_iterator] hint, LOOKUP_KEY&& value) requires BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR, LOOKUP_KEY>::value && !bsl::is_convertible<LOOKUP_KEY&&, iterator>::value && !bsl::is_convertible<LOOKUP_KEY&&, const_iterator>::value; ---- [.small]#xref:bsl/set-0d/insert-0e.adoc[_» more..._]# == Return Value * pair of iterator and whether a new element was inserted * iterator to the existing or newly inserted element == Parameters [cols="1,4"] |=== | Name| Description | *value* | key to move‐insert | *values* | initializer list of keys to insert | *hint* | iterator hint for insertion position | *first* | beginning of the range (inclusive) | *last* | end of the range (exclusive) |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#