swap(std::stop_token)(3)
πΈ swap(std::stop_token) πΈ
okay bestie, welcome to the C++ Standard Libary manual page for swap(std::stop_token) β section 3 energy, and yes that spelling is exactly what the manual name says, we're keeping it π
π NAME π
swap(std::stop_token) β swap(std::stop_token) (the name is literally the name, and honestly? iconic.)
β¨ Synopsis β¨
friend void swap( stop_token& lhs, stop_token& rhs ) noexcept;
(since C++20)
This overloads the std::swap algorithm for std::stop_token. It exchanges the associated stop-state of lhs with that of rhs. Effectively calls lhs.swap(rhs).
bestie listen: this function is not visible to ordinary unqualified or qualified lookup. It can only be found by argument-dependent lookup when std::stop_token is an associated class of the arguments. It's giving hidden ADL-only main-character function. π«Ά
π Parameters π
lhs,rhsβ stop_tokens to swap
π Return value π
(none) β literally nothing comes back, bestie, it just does the swap and leaves. π
mwah π this iconic little page is from http://cppreference.com, dated 2024.06.10 β periodt. π
π¦ 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