Emplace a newly constructed element near hint.

Synopsis

Declared in <bslstl_multimap.h>

template<class... Args>
multimap<KEY, VALUE, COMPARATOR, ALLOCATOR>::iterator
emplace_hint(
    const_iterator hint,
    Args&&... args);

Description

Insert into this multimap 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 (in amortized constant time if the specified hint is a valid immediate successor to the value_type object constructed from args). Return an iterator referring to the newly created and inserted object in this multimap. If hint is not a valid immediate successor to the value_type object implied by args, this operation has O[log(N)] complexity where N is the size of this multimap. This method requires that the (template parameter) types KEY and VALUE both be emplace‐constructible from args (see {Requirements on KEY and VALUE}). The behavior is undefined unless hint is an iterator in the range [begin() .. end()] (both endpoints included).

Return Value

iterator referring to the newly inserted element

Parameters

Name

Description

hint

iterator hint for the insertion position

args

constructor arguments for the new element

Created with MrDocs