std::shared...k::operator=(3)

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

πŸ‘‘ NAME πŸ‘‘

Welcome to std::shared...k::operator=(3) from the C++ Standard Libary β€” yes bestie, that's the manual name, spelling and all πŸ™ˆ we're deep in shared_lock assignment-operator territory πŸŽ€

  • std::shared_lock::operator= β€” it's literally std::shared_lock::operator= 😭 no notes, that's the whole name.

πŸ¦‹ Synopsis πŸ¦‹

shared_lock& operator=( shared_lock&& other ) noexcept;  (since C++14)

Okay so this is the move assignment operator ✨ it replaces the contents with those of other using move semantics. Periodt.

If, prior to this call, *this has an associated mutex (mutex() returns a non-null pointer) and has acquired ownership of it (owns() returns true), the mutex is unlocked by calling unlock_shared() πŸ”“

After this call, other has no associated mutex. Not a single one. Gone. πŸ’¨


🌸 Parameters 🌸

  • other β€” another shared_lock to replace the state with 🫢

⭐ Return value ⭐

*this β€” that's the return value, bestie πŸ’…


This iconic lil page came from http://cppreference.com, dated 2024.06.10, and the manual title is std::shared...k::operator=(3) 🌈✨ bye bestie, go move-assign responsibly πŸ§šπŸ’œ

πŸ“¦ where this page comes from