std::shared_lock::operator=

shared_lock& operator=( shared_lock&& other ) noexcept;
(C++14 起)

移动赋值运算符。用移动语义以 other 的内容替换内容。

若在此调用前 *this 拥有关联的互斥( mutex() 返回非空指针且)且获得了其所有权( owns() 返回 true ),则通过调用 unlock_shared() 解锁互斥。

此调用后, other 无关联的互斥。


参数

other - 用以替换状态的另一 shared_lock

返回值

*this

版本历史

  • (当前 | 先前) 2017年8月24日 (四) 07:45Fruderica讨论 | 贡献. . (747字节) (+747). . (以“{{cpp/thread/shared_lock/title|operator{{=}}}} {{cpp/thread/shared_lock/navbar}} {{dcl begin}} {{dcl | since=c++14 | 1= shared_lock& operator=( shared_lock&& other )...”为内容创建页面)