swap(std::stop_source)(3)
π swap(std::stop_source)(3) π
okay bestie, welcome to the C++ Standard Libary manual page for swap(std::stop_source) β yes, the title is a whole mouthful, but she's iconic and we're gonna break her down. π«Ά This one's all about swapping stop-sources, no cap.
π NAME π
swap(std::stop_source) β yep, that's literally the name: swap(std::stop_source). Main character energy, periodt. β¨
πΈ Synopsis πΈ
friend void swap( stop_source& lhs, stop_source& rhs ) noexcept;
(since C++20) β
This overloads the std::swap algorithm for std::stop_source. It exchanges the stop-state of lhs with that of rhs. Effectively calls lhs.swap(rhs). That's the whole flex. π
π¨ important caveat, bestie: this function is not visible to ordinary unqualified or qualified lookup, and can only be found by argument-dependent lookup when std::stop_source is an associated class of the arguments. iykyk.
π Parameters π
lhs,rhsβ thestop_sourcesto swap. two besties, one swap vibe. π¦
π¦ Return value π¦
(none) β literally nothing comes back out. zero. nada. the void. π
okay that's the whole page, bestie β source: http://cppreference.com, version/date: 2024.06.10. mwah π
π¦ 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