insert overloads

Synopses

Declared in <bdlc_flathashmap.h>

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

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

Insert the specified value into this map if the key of value does not already exist in this map; otherwise, this method has no effect. Return a pair whose first member is an iterator referring to the (possibly newly inserted) modifiable element in this map whose key 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 element with an equivalent key was already present.

template<class VALUE_TYPE>
bsl::pair<iterator, bool>
insert(VALUE_TYPE&& value)
requires bsl::is_constructible<value_type,
                                                  VALUE_TYPE&&>::value;

Insert into this map 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 the key of a member of the input sequence is equivalent to the key of 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 value into this map if the key of value does not already exist in this map; otherwise, this method has no effect. Return an iterator referring to the (possibly newly inserted) modifiable element in this map whose key is equivalent to that of the element to be inserted. The supplied const_iterator is ignored.

template<class VALUE_TYPE>
iterator
insert(
    const_iterator,
    VALUE_TYPE&& value)
requires bsl::is_constructible<value_type,
                                                  VALUE_TYPE&&>::value;

Created with MrDocs