BloombergLP::bdlc::FlatHashSet::insert

insert overloads

Synopses

Declared in <bdlc_flathashset.h>

Insert the specified value into this set if not already present.

bsl::pair<const_iterator, bool>
insert(bslmf::MovableRef<KEY> value);
» more...

Insert each element from the specified initializer list.

void
insert(bsl::initializer_list<KEY> values);
» more...

Insert the specified value into this set if not already present.

bsl::pair<const_iterator, bool>
insert(KEY const& value);
» more...

Insert the specified key into this set if not already present.

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

Insert the specified value, ignoring the insertion hint.

const_iterator
insert(
    const_iterator hint,
    bslmf::MovableRef<KEY> value);
» more...

Insert the specified value, ignoring the insertion hint.

const_iterator
insert(
    const_iterator hint,
    KEY const& value);
» more...

Insert each element from the specified iterator range.

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

Insert the specified key, ignoring the insertion hint.

template<class LOOKUP_KEY>
iterator
insert(
    const_iterator hint,
    LOOKUP_KEY&& key)
requires BloombergLP::bslmf::IsTransparentPredicate<HASH, LOOKUP_KEY>::value
         && BloombergLP::bslmf::IsTransparentPredicate<EQUAL,LOOKUP_KEY>::value
         && bsl::is_convertible<LOOKUP_KEY&&, const_iterator>::value == false
         && bsl::is_convertible<const_iterator, LOOKUP_KEY&&>::value == false;
» more...

Return Value

  • pair of iterator to the element and whether insertion occurred
  • iterator to the existing or newly inserted element

Parameters

NameDescription
valueelement to insert
valuesinitializer list of elements to insert
keykey to insert
hintignored hint iterator
firstbeginning of the input range
lastend of the input range (exclusive)