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
はコピー代入可能ではありません。[編集] 引数
other | - | 状態を取得する別の promise
|
[編集] 戻り値
*this。