std::shared_future<T>::operator=
提供: cppreference.com
< cpp | thread | shared future
(1) | ||
shared_future& operator=(const shared_future& other ); | (C++11以上) (C++17未満) | |
shared_future& operator=(const shared_future& other )noexcept; | (C++17以上) | |
shared_future& operator=( shared_future&& other )noexcept; | (2) | (C++11以上) |
別の shared_future
の内容を代入します。
1) 共有状態を解放し、
other
の内容を *this に代入します。 代入後、 this->valid()== other.valid() になります。2) 共有状態を解放し、
other
の内容を *this にムーブ代入します。 代入後、 other.valid()==false になり、 this->valid() は代入前の other.valid() と同じ値になります。[編集]引数
other | - | 状態を *this に転送する std::shared_future |
[編集]戻り値
*this。