insert overloads
Synopses
Declared in <bdlc_flathashset.h>
Insert the specified value into this set if not already present.
Insert each element from the specified initializer list.
void
insert(bsl::initializer_list<KEY> values);
Insert the specified value into this set if not already present.
bsl::pair<const_iterator, bool>
insert(KEY const& value);
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;
Insert the specified value, ignoring the insertion hint.
const_iterator
insert(
const_iterator hint,
bslmf::MovableRef<KEY> value);
Insert the specified value, ignoring the insertion hint.
const_iterator
insert(
const_iterator hint,
KEY const& value);
Insert each element from the specified iterator range.
template<class INPUT_ITERATOR>
void
insert(
INPUT_ITERATOR first,
INPUT_ITERATOR last);
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;
Return Value
-
pair of iterator to the element and whether insertion occurred
-
iterator to the existing or newly inserted element
Parameters
Name |
Description |
value |
element to insert |
values |
initializer list of elements to insert |
key |
key to insert |
hint |
ignored hint iterator |
first |
beginning of the input range |
last |
end of the input range (exclusive) |
Created with MrDocs