Insert value if its key is missing.

Synopsis

Declared in <bslstl_unorderedset.h>

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

Description

Insert values from the iterator range if their keys are missing.

Insert into this set the value of each value_type object in the range starting at the specified first iterator and ending immediately before the specified last iterator, if a key equivalent to the object is not already contained in this set. The (template parameter) type INPUT_ITERATOR shall meet the requirements of an input iterator defined in the C++11 standard [24.2.3]providing access to values of a type convertible to value_type, and value_type must be emplace‐constructible from *i into this set, where i is a dereferenceable iterator in the range [first .. last)] (see {Requirements on KEY}). 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.

Parameters

Name

Description

first

beginning of the range of values to insert

last

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

Created with MrDocs