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