std::promise<R>::operator=
來自 cppreference.com
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
不可複製賦值。[編輯] 引數
其他 | - | 另一個 promise 物件,從中獲取狀態。 |
[編輯] 返回值
*this