std::shared_future<T>::operator=
来自 cppreference.cn
< cpp | thread | shared future
(1) | ||
shared_future& operator=( const shared_future& other ); |
(since C++11) (until C++17) |
|
shared_future& operator=( const shared_future& other ) noexcept; |
(since C++17) | |
shared_future& operator=( shared_future&& other ) noexcept; |
(2) | (since C++11) |
将另一个 shared_future
的内容赋值给此对象。
1) 释放任何共享状态,并将 other 的内容赋值给 *this。赋值后,this->valid() == other.valid()。
2) 释放任何共享状态,并将 other 的内容移动赋值给 *this。赋值后,other.valid() == false 且 this->valid() 将产生与赋值前 other.valid() 相同的值。
[edit] 参数
other | - | 一个 std::shared_future ,它将状态转移到 *this |
[edit] 返回值
*this