[ Web Proxy ]
URL:
Viewing: https://ru.cppreference.com/cpp/container/map/emplace [Back]  [Original]

std::map::emplace cppreference.com
cppreference.com

std::map::emplace

cppreference.com

<metanoindex/>

<tbody> </tbody>
template< class... Args > std::pair<iterator,bool> emplace( Args&&... args );
( C++11)
. , .. . The constructor of the element type (value_type, that is, std::pair<const Key, T>) is called with exactly the same arguments as supplied to the function, forwarded with std::forward<Args>(args)....
:
Inserts a new element to the container. The element is constructed in-place, i.e. no copy or move operations are performed. The constructor of the element type (value_type, that is, std::pair<const Key, T>) is called with exactly the same arguments as supplied to the function, forwarded with std::forward<Args>(args)....
Google.
. .

.

args
:
arguments to forward to the constructor of the element
Google.
. .

returns a pair consisting of a bool denoting whether the insertion took place and an iterator to the inserted element.

Logarithmic in the size of the container.

.

,
(public -) []
( C++17)
(public -) []

Web Proxy Viewer  |  New URL  |  Original Page