std::swap(s...unique_lock)(3)
π
std::swap(s...unique_lock)(3) β std::swap(std::unique_lock) β¨
okay so bestie, this page is from the C++ Standard Libary manual, section 3 β and yes, βLibaryβ is literally spelled like that in the manual name, no cap π. Itβs all about std::swap(std::unique_lock), and weβre gonna get you comfy with it π.
πΈ NAME πΈ
std::swap(std::unique_lock) β std::swap(std::unique_lock)
β¨ Synopsis β¨
template< class Mutex >
void swap( unique_lock<Mutex>& lhs, (since C++11)
unique_lock<Mutex>& rhs ) noexcept;
So this one specializes the std::swap algorithm for std::unique_lock. It exchanges the state of lhs with that of rhs. Effectively calls lhs.swap(rhs). And the signature is noexcept, periodt π
. Itβs been here since C++11, iykyk β.
π Parameters π
lhs,rhsβ lock wrappers whose states to swap.
π Return value π
(none) β literally nothing comes back, and thatβs iconic π«Ά.
π¦ Example π¦
This section is incomplete Reason: no example
π See also π
swapβ swaps state with anotherstd::unique_lock(public member function)
π Category π
* Todo no example
k bye bestie π this came from http://cppreference.com, version/date 2024.06.10, page std::swap(s...unique_lock)(3) β 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