std::swap(s...ckaged_task)(3)
πΈ NAME πΈ
std::swap(std::packaged_task) β std::swap(std::packaged_task) π
hey bestie, welcome to the std::swap(std::packaged_task) page from the C++ Standard Libary manual β the header calls it std::swap(s...ckaged_task)(3). yes, βLibaryβ is spelled like that on the page, and we are keeping it πβ¨
β¨ Synopsis β¨
okay so hereβs the exact signature, and yes itβs a template, and yes itβs noexcept β iconic behavior only:
template< class Function, class... Args >
void swap( packaged_task<Function(Args...)> &lhs, (since
C++11)
packaged_task<Function(Args...)> &rhs ) noexcept;
Specializes the std::swap algorithm for std::packaged_task. It exchanges the state of lhs with that of rhs. Effectively calls lhs.swap(rhs). slay π
π Parameters π
lhs,rhsβ packaged tasks whose states to swap. thatβs the whole vibe, bestie π«Ά
π Return value π
(none) β literally nothing comes back. no cap, itβs giving βvoid but make it cuteβ π
π¦ Example π¦
This section is incomplete. Reason: no example.
no example yet π the page is lowkey just standing there looking pretty π
π See also π
swapβ swaps two task objects (public member function). obsessed, honestly π₯
π Category π
- Todo β no example.
mwah π this cutie came from http://cppreference.com, version/date 2024.06.10, page std::swap(s...ckaged_task)(3) β catch u later, bestie πβ
π¦ 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