Namespaces
Variants
Actions

std::map<Key,T,Compare,Allocator>::emplace_hint

From cppreference.com
< cpp‎ | container‎ | map
 
 
 
 
template< class... Args >
iterator emplace_hint( const_iterator hint, Args&&... args );
(since C++11)
(constexpr since C++26)

Inserts a new element into the container as close as possible to the position just before hint.

The constructor of value_type (i.e., std::pair<const Key, T>) is called with exactly the same arguments as supplied to the function, forwarded with std::forward<Args>(args)....

No iterators or references are invalidated.

Contents