std::shared_future<T>::operator=
shared_future& operator=( const shared_future& other ); | (1) |
(начиная с 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 | - | объект std::shared_future, который передаст состояние объекту *this |
Возвращаемое значение
*this
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/cpp/thread/shared_future/operator%3D