std::swap(s...shared_lock)(3)

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

✨ NAME ✨

okay so bestie, we're in the C++ Standard Libary manual β€” yes, that's the manual name, keep it β€” and this page is all about std::swap(std::shared_lock) β€” literally std::swap(std::shared_lock). That's the name, periodt. πŸ’…

πŸ¦‹ Synopsis πŸ¦‹

template< class Mutex >

void swap( shared_lock<Mutex>& lhs,             (since C++14)

           shared_lock<Mutex>& rhs ) noexcept;

This is the std::swap algorithm getting its special std::shared_lock treatment β€” a specialization, lowkey iconic. It exchanges the state of lhs with that of rhs, and effectively calls lhs.swap(rhs). ✨

🌸 Parameters 🌸

  • lhs, rhs β€” lock wrappers whose states to swap. That's it, bestie, those are the whole parameters. 🫢

πŸ’– Return value πŸ’–

  • (none) β€” no return value here, fr fr. The function returns nothing. πŸ’€

πŸŽ€ Example πŸŽ€

This section is incomplete.

Reason: no example.

Not me noticing there's literally no example on this page 😭 β€” that's just what it says. πŸ“

πŸ”₯ See also πŸ”₯

  • swap β€” swaps the data members with another shared_lock (public member function). Obsessed with a classic, ngl. πŸ’œ

⭐ Category ⭐

  • Todo no example β€” yep, that's the category note. No cap. πŸ’…

made with πŸ“ from http://cppreference.com, dated 2024.06.10, for std::swap(s...shared_lock)(3). bye bestie! πŸ’–βœ¨

πŸ“¦ where this page comes from