Scroll to navigation

std::experimental::future::operator=(3) C++ Standard Libary std::experimental::future::operator=(3)

NAME

std::experimental::future::operator= - std::experimental::future::operator=

Synopsis


std::experimental::future<T>& operator=( std::experimental::future<T>&& other ) (1)
noexcept;
std::experimental::future<T>& operator=( const std::experimental::future<T>& (2)
other ) = delete;


Assigns the contents of another future object.


1) Releases any shared state and move-assigns the contents of other to *this. After
the assignment, other.valid() == false and this->valid() will yield the same value
as other.valid() before the assignment.


2) std::experimental::future is not CopyAssignable.

Parameters


other - a std::experimental::future that will transfer state to *this

Return value


*this

2022.07.31 http://cppreference.com