Inserts an element constructed in place (no copy or move operations are performed), with a placement hint.

template<class... Args>
   iterator emplace_hint(
      const_iterator where,
      Args&&... args);




The arguments forwarded to construct an element to be inserted into the multimap.


The place to start searching for the correct point of insertion. (If that point immediately precedes where, insertion can occur in amortized constant time instead of logarithmic time.)

An iterator to the newly inserted element.

No references to container elements are invalidated by this function, but it may invalidate all iterators to the container.

During emplacement, if an exception is thrown, the container's state is not modified.

The value_type of an element is a pair, so that the value of an element will be an ordered pair with the first component equal to the key value and the second component equal to the data value of the element.

For a code example, see map::emplace_hint.


Header: <map>

Namespace: std

© 2015 Microsoft