std::packaged_task::swap(3)

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

πŸŽ€ NAME πŸŽ€

std::packaged_task::swap β€” okay so this is literally the page for swapping two packaged tasks, bestie, straight out of the C++ Standard Libary manual. It’s giving β€œtiny function, big main character energy.” πŸ’…


✨ Synopsis ✨

void swap( packaged_task& other ) noexcept;  (since C++11)

This iconic little function exchanges the shared states and stored tasks of *this and other. No cap, that’s the whole vibe. πŸ¦‹


πŸ’– Parameters πŸ’–

  • other β€” packaged task whose state to swap with

🌸 Return value 🌸

(none) β€” literally nothing, bestie. It’s giving mysterious and empty-handed on purpose. 😌


πŸ”₯ See also πŸ”₯

  • std::swap(std::packaged_task) β€” specializes the std::swap algorithm. (C++11) (function template) ⭐

mwah πŸ’‹ β€” source: http://cppreference.com, version/date: 2024.06.10, page: std::packaged_task::swap(3). That’s the whole manual moment, bestie. 🫢

πŸ“¦ where this page comes from