insert overloads

Synopses

Declared in <bdlc_flathashset.h>

Insert the specified value into this set if the value does not already exist in this set; otherwise, this method has no effect. Return a pair whose first member is a const_iterator referring to the (possibly newly inserted) element in this set whose value is equivalent to that of the element to be inserted, and whose second member is true if a new element was inserted, and false if an equivalent value was already present.

Insert into this set an element having the value of each object in the specified values initializer list if an equivalent value is not already contained in this set. This method requires that the (template parameter) type KEY be copy‐insertable (see {Requirements on KEY, HASH, and EQUAL}).

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

Insert the specified value into this set if the value does not already exist in this set; otherwise, this method has no effect. Return a pair whose first member is a const_iterator referring to the (possibly newly inserted) element in this set whose value is equivalent to that of the element to be inserted, and whose second member is true if a new element was inserted, and false if an equivalent value was already present.

Insert the specified key into this set if a key equivalent to k does not already exist in this set; otherwise, this method has no effect. Return a pair containing an iterator referring to the newly inserted element and true if a element was inserted. Return a pair containing an iterator to an existing element and false if the value already existed in the set.

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;

Insert the specified value into this set if the value does not already exist in this set; otherwise, this method has no effect. Return a const_iterator referring to the (possibly newly inserted) element in this set whose value is equivalent to that of the element to be inserted. The supplied const_iterator is ignored.

Insert the specified value into this set if the value does not already exist in this set; otherwise, this method has no effect. Return a const_iterator referring to the (possibly newly inserted) element in this set whose value is equivalent to that of the element to be inserted. The supplied const_iterator is ignored.

const_iterator
insert(
    const_iterator,
    KEY const& value);

Insert into this set the value of each element in the input iterator range specified by first through last (including first, excluding last). 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. Note that if a member of the input sequence is equivalent to an earlier member, the later member will not be inserted.

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

Insert the specified key into this set if a key equivalent to k does not already exist in this set; otherwise, this method has no effect. Return a pair containing an iterator referring to the newly inserted element and true if a element was inserted. Return a pair containing an iterator to an existing element and false if the value already existed in the set. The supplied const_iterator is ignored.

template<class LOOKUP_KEY>
iterator
insert(
    const_iterator,
    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;

Created with MrDocs