std::list<T,Allocator>::emplace_front
From cppreference.com
 
 
 
 
 
 C++ 
 Feature test macros (C++20)
 Concepts library (C++20)
 Metaprogramming library (C++11)
 Ranges library (C++20)
 Filesystem library (C++17)
 Concurrency support library (C++11)
 Execution control library (C++26)
Containers library 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
(C++17)
(C++11)
(C++26)
(C++26)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++23)
(C++23)
(C++23)
(C++23)
(C++20)
(C++23)
 Tables
std::list 
 
 
 
 
 
 
 
 
 
 
 
 
 
  
 
(C++23)
  (C++11)
(C++11)
(C++11)
(C++11)
(C++23)
(C++11)
list::emplace_front
(C++11)
(C++23)
(C++11)
(C++23)
(until C++20)(until C++20)(until C++20)(until C++20)(until C++20)
 Deduction guides (C++17)
template< class... Args >
void emplace_front( Args&&... args );
 
 (since C++11) void emplace_front( Args&&... args );
(until C++17)
template< class... Args >
reference emplace_front( Args&&... args );
 
 (since C++17) reference emplace_front( Args&&... args );
(constexpr since C++26)
Inserts a new element to the beginning of the container. The element is constructed through std::allocator_traits::construct , which typically uses placement new to construct the element in-place at the location provided by the container. The arguments args... are forwarded to the constructor as std::forward <Args>(args)....
No iterators or references are invalidated.
[edit] Parameters
 args
 -
 arguments to forward to the constructor of the element
 Type requirements
[edit] Return value
 (none)
 (until C++17)
 A reference to the inserted element.
 (since C++17)
[edit] Complexity
Constant.
[edit] Exceptions
If an exception is thrown for any reason, this function has no effect (strong exception safety guarantee).