std::experimental::future<T>::operator=
来自cppreference.com
< cpp | experimental | future
std::experimental::future<T>& operator=( std::experimental::future<T>&& other ) noexcept; |
(1) | |
std::experimental::future<T>& operator=( const std::experimental::future<T>& other ) = delete; |
(2) | |
赋值另一 future
对象的内容。
1) 释放任何共享状态并移动赋值 other
给 *this 。赋值后 other.valid() == false 而 this->valid() 将生成与 other.valid() 在赋值前相同的值。
2) std::experimental::future 不可复制赋值 (CopyAssignable) 。
参数
other | - | 将传递状态给 *this 的 std::experimental::future
|
返回值
*this