CppDS.com

C++ 98 11 14 17 20 手册

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() == falsethis->valid() 将生成与 other.valid() 在赋值前相同的值。

2) std::experimental::future可复制赋值 (CopyAssignable)

参数

other - 将传递状态给 *thisstd::experimental::future

返回值

*this

关闭