STD::LOCK_GUARD(3cxx)

🌸 std::lock_guard< _Mutex > β€” cxx manual page, bestie 🌸

okay so this is the std::lock_guard< _Mutex > page from manual section 3cxx, and it is literally giving "simple scoped lock type" main character energy. no cap.

✨ NAME ✨

std::lock_guard< _Mutex > β€” A simple scoped lock type.

πŸŽ€ SYNOPSIS πŸŽ€

#include <mutex>

πŸ’… Public Types

  • typedef _Mutex mutex_type

🫢 Public Member Functions

  • lock_guard (const lock_guard &)=delete
  • lock_guard (mutex_type &__m)
  • lock_guard (mutex_type &__m, adopt_lock_t) noexcept
  • lock_guard & operator= (const lock_guard &)=delete

πŸ”₯ Detailed Description πŸ”₯

template<typename _Mutex>
class std::lock_guard< _Mutex >"A simple scoped lock type.

A lock_guard controls mutex ownership within a scope, releasing ownership in the destructor. that's the whole vibe: it holds the mutex while it's alive, then lets go when it's destroyed. iconic behavior, honestly.

⭐ Since

C++11

🧚 Author

Generated automatically by Doxygen for libstdc++ from the source code.


Cute little sign-off: source/version is libstdc++, the footer tag is std::lock_guard< _Mutex >(3cxx), and the date field isn’t printed in this copy β€” so no fake date here, bestie πŸ’œ

πŸ“¦ where this page comes from