Share via


multiset::emplace_hint

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);

Parameters

Parameter

Description

args

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

where

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.)

Return Value

An iterator to the newly inserted element.

Remarks

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.

For a code example, see set::emplace_hint.

Requirements

Header: <set>

Namespace: std

See Also

Reference

<set>

set Class

Standard Template Library