std::unique...peratorbool(3)

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

🌸 NAME 🌸

std::unique_lock::operatorbool β€” yep, std::unique_lock::operatorbool, bestie. This is the page for std::unique...peratorbool(3) in the C++ Standard Libary, and it's giving β€œtiny operator, big main-character energy.” πŸ’…


✨ Synopsis ✨

explicit operator bool() const noexcept;  (since C++11)

Checks whether *this owns a locked mutex or not. Effectively calls owns_lock(). Periodt β€” that's the whole vibe check. 🫢

πŸŽ€ Parameters πŸŽ€

(none) β€” not a single parameter, zero, nada. She takes nothing. πŸ’–

πŸ”₯ Return value πŸ”₯

true if *this has an associated mutex and has acquired ownership of it, false otherwise. No cap, that's the exact split. ✨

πŸ¦‹ See also πŸ¦‹

  • owns_lock β€” tests whether the lock owns (i.e., has locked) its associated mutex (public member function). Iconic sibling behavior, fr fr. πŸ’œ

πŸ’– cute little sign-off: source/version + date are http://cppreference.com, 2024.06.10, and the page is std::unique...peratorbool(3). Go forth and own that mutex, bestie! πŸ’…πŸŽ€

πŸ“¦ where this page comes from