std::shared_lock<Mutex>::operator=
来自cppreference.com
<tbody>
</tbody>
shared_lock& operator=( shared_lock&& other ) noexcept; |
(C++14 起) | |
移动赋值运算符。等价于 shared_lock{std::move(other)}.swap(*this); return *this;。
如果 other 与 *this 为同一对象则无效果。
若在此调用前 *this 拥有关联的互斥体(mutex() 返回非空指针)且获得了其所有权(owns() 返回 true),则通过调用 std::shared_mutex::unlock_shared 解锁互斥体。此调用后,other 无关联的互斥体。
参数
| other | - | 用以替换状态的另一 shared_lock
|
返回值
*this