std::future<T>::operator=
提供: cppreference.com
future& operator=( future&& other ) noexcept; |
(1) | (C++11以上) |
future& operator=( const future& other ) = delete; |
(2) | (C++11以上) |
別のフューチャーオブジェクトの内容を代入します。
1) 共有状態を解放し、 other
の内容を *this にムーブ代入します。 代入後、 other.valid() == false となり、 this->valid() は代入前の other.valid() と同じ値になります。
2) std::future は CopyAssignable ではありません。
[編集] 引数
other | - | *this に状態を転送する std::future
|
[編集] 戻り値
*this。