insert overloads

Synopses

Declared in <bslstl_unorderedset.h>

Insert value if its key is missing.

Insert each value from values if its key is missing.

void
insert(std::initializer_list<KEY> values);

Insert value if its key is missing.

Insert value if its key is missing.

template<class LOOKUP_KEY>
pair<iterator, bool>
insert(LOOKUP_KEY&& value)
requires BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
        && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value;

Insert value using hint if its key is missing.

Insert value using hint if its key is missing.

Insert value if its key is missing.

template<class INPUT_ITERATOR>
void
insert(
    INPUT_ITERATOR first,
    INPUT_ITERATOR last);

Insert value using hint if its key is missing.

template<class LOOKUP_KEY>
iterator
insert(
    const_iterator hint,
    LOOKUP_KEY&& value)
requires BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
        && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value
        && !bsl::is_convertible<LOOKUP_KEY&&, iterator>::value
        && !bsl::is_convertible<LOOKUP_KEY&&, const_iterator>::value;

Return Value

  • iterator to the element and whether insertion occurred

  • iterator to the existing or newly inserted element

Parameters

Name

Description

value

value to insert

values

initializer list of values

hint

position hint for insertion

first

beginning of the range of values to insert

last

end of the range of values to insert (one past last)

Created with MrDocs