- 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
- Clang: 3.5 [mark verified]
- GCC: 4.9 [mark verified]
- ICC: ??
- Visual C++: 2015 [mark verified]