[#bsl-set-0d-insert-00c] = xref:bsl.adoc[bsl]::xref:bsl/set-0d.adoc[set]::insert :relfileprefix: ../../ :mrdocs: Insert a transparent `value` if an equivalent key is not present. == Synopsis Declared in `<bslstl_set.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class LOOKUP_KEY> xref:bsl/pair-0b.adoc[pair<iterator, bool>] insert(LOOKUP_KEY&& value) requires BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR, LOOKUP_KEY>::value; ---- == Description `value` is left in a valid but unspecified state. Return a pair whose `first` member is an iterator referring to the (possibly newly inserted) `value_type` object in this set that is equivalent to `value`, and whose `second` member is `true` if a new value was inserted, and `false` if the key was already present. Note: implemented inline due to Sun CC compilation error. == Return Value pair of iterator and whether a new element was inserted == Parameters [cols="1,4"] |=== | Name| Description | *value* | key to insert |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#