std::promise<R>::operator=
来自 cppreference.cn
promise& operator=( promise&& other ) noexcept; |
(1) | (自 C++11 起) |
promise& operator=( const promise& rhs ) = delete; |
(2) | (自 C++11 起) |
赋值内容。
1) 移动赋值运算符。首先,放弃共享状态(如同 ~promise() 中那样),然后如同执行 std::promise(std::move(other)).swap(*this) 一样赋值 other 的共享状态。
2)
promise
不可复制赋值。[编辑] 参数
other | - | 要从中获取状态的另一个 promise |
[编辑] 返回值
*this