std::swap(s...ckaged_task)(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

🌸 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