std::experi...ckaged_task)(3)
π std::experimental::swap(std::experimental::packaged_task) β the NAME section, bestie
okay so this page lives in the C++ Standard Libary manual (yes that's how it's spelled, don't come for me π), and the star of the show is std::experimental::swap(std::experimental::packaged_task). Say that five times fast. Or like, once. It's a mouthful. π«Ά
β¨ Synopsis β¨
Here's the whole vibe, written out exactly:
template< class R, class... Args >
void swap( std::experimental::packaged_task<R(Args...)> &lhs,
std::experimental::packaged_task<R(Args...)> &rhs )
noexcept;
So what's it doing? It overloads the swap algorithm for std::experimental::packaged_task. It exchanges the state of lhs with that of rhs. And the way it does that? Bestie, it effectively calls lhs.swap(rhs) β like, that's literally the whole implementation, no cap. β¨
Also note it's noexcept, so it's giving calm, unbothered, no-throw main character energy. π
π Parameters π
lhs,rhsβ packaged_tasks whose states to swap. That's it. That's the list. Two little guys trading states. π¦
πΈ Return value πΈ
(none) β nothing, nada, zero. It hands you back absolutely nothing and honestly? Respect. π
π Example π
This section is incomplete Reason: no example
screaming crying throwing up π the example section is EMPTY. no example. none. we got nothing. the docs said "figure it out yourself bestie" π
π See also π
swapβ swaps two task objects (public member function ofstd::packaged_task<R(Args...)>). the icon itself, the original, the blueprint. π₯
β Category β
- Todo no example
(yep, the todo is immortalized in the category list. it's canon now. π)
anyway that's the whole page, bestie β go swap some packaged tasks, you're gonna slay π
source: http://cppreference.com Β· version/date: 2024.06.10 Β· mwah, catch you in the next manpage π
π¦ 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