std::forwar...place_front(3)
π NAME π
okay so bestie, welcome to the std::forwar...place_front(3) page from the C++ Standard Libary β yes, that's the manual name, and yes, βLibaryβ is literally what the header says, not me being chaotic π.
std::forward_list::emplace_front β literally std::forward_list::emplace_front. That's the name, that's the vibe, we move. π
πΈ Synopsis πΈ
template< class... Args > (since C++11)
void emplace_front( Args&&... args ); (until C++17)
template< class... Args > (since C++17)
reference emplace_front( Args&&... args );
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. No cap. β¨
π Parameters π
argsβ arguments to forward to the constructor of the element.
π§ Type requirements π§
T(the container's element type) must meet the requirements ofEmplaceConstructible.
β Return value β
(none)β until C++17- A reference to the inserted element. β since C++17
π₯ Complexity π₯
Constant.
π Exceptions π
If an exception is thrown for any reason, this function has no effect (strong exception safety guarantee). Like, it's giving βwhat happens in this call stays in this callβ β no changes left behind, periodt. π«Ά
π See also π
push_frontβ inserts an element to the beginning (public member function).
okay bye bestie π«Ά this page is from http://cppreference.com, dated 2024.06.10, and it's the std::forwar...place_front(3) manual page β slay π
β¨
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms