std::list::emplace_back

From Cppreference

Jump to: navigation, search
template< class... Args >
void emplace_back( Args&&... args );
(C++11 feature)

Inserts a new element to the end of the container. The element is constructed in-place, i.e. no copy or move operations are performed. The constructor of the element is called with exactly the same arguments, as supplied to the function.

Contents

[edit] Parameters

args - arguments to forward to the constructor of the element

[edit] Return value

(none)

[edit] Complexity

Constant.

[edit] See also

push_back
inserts elements to the end
(public member function)