首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

std::shared_lock::operator bool

explicit operator bool() const;

?

(since C++14)

检查是否*this是否拥有一个锁定的互斥体。有效呼叫owns_lock()...

参数

%280%29

返回值

true如果*this拥有一个关联的互斥体,并拥有它的共享所有权,false否则。

例外

noexcept规格:

noexcept

另见

owns_lock

tests whether the lock owns its associated mutex (public member function)

代码语言:txt
复制
 ? cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com