Skip to content

Latest commit

 

History

History
54 lines (41 loc) · 1 KB

File metadata and controls

54 lines (41 loc) · 1 KB

mutex

  • shared_mutex[meta header]
  • std[meta namespace]
  • shared_lock[meta class]
  • function[meta id-type]
  • cpp14[meta cpp]
mutex_type* mutex() const noexcept;

概要

所有しているミューテックスオブジェクトを取得する

戻り値

保持しているミューテックスオブジェクトへのポインタを返す

例外

投げない

#include <shared_mutex>

int main()
{
  std::shared_timed_mutex mtx;
  {
    std::shared_lock<std::shared_timed_mutex> lock(mtx);

    // ミューテックスを取得
    std::shared_timed_mutex* m = lock.mutex();
  }
}
  • mutex()[color ff0000]
  • std::shared_timed_mutex[link /reference/shared_mutex/shared_timed_mutex.md]

出力

バージョン

言語

  • C++14

処理系