Emplace a newly constructed element, using an insertion hint.

Synopsis

Declared in <bdlc_flathashset.h>

template<class... ARGS>
FlatHashSet<KEY, HASH, EQUAL>::iterator
emplace_hint(
    const_iterator hint,
    ARGS&&... args);

Description

Insert into this set a newly created value_type object, constructed by forwarding get_allocator() (if required) and the specified (variable number of) args to the corresponding constructor of value_type, if a key equivalent to such a value does not already exists in this set; otherwise, this method has no effect (other than possibly creating a temporary value_type object). Return an iterator referring to the (possibly newly created and inserted) object in this set whose value is equivalent to that of an object constructed from arguments. The average and worst case complexity of this operation is not affected by the specified hint. Note that hint is ignored (other than possibly asserting its validity in some build modes).

Return Value

iterator to the (possibly newly inserted) element

Parameters

Name

Description

hint

ignored hint iterator

args

constructor arguments forwarded to value_type

Created with MrDocs