Documentation Home >> Headers >> <jss/experimental_future.hpp> Header >> std::experimental::shared_future >> std::experimental::shared_future Unwrapping Assignment Operator

Replaces the asynchronous state associated with *this with a new asynchronous state that unwraps the provided std::experimental::shared_future object.

shared_future& operator=(future<shared_future<ResultType>>&& other);
shared_future& operator=(shared_future<shared_future<ResultType>> const & other);

Effects:
shared_future& operator=(future<shared_future<ResultType>>&& other){
  shared_future temp(std::move(other));
  swap(temp);
  return *this;
}

shared_future& operator=(shared_future<shared_future<ResultType>>const& other){
  shared_future temp(other);
  swap(temp);
  return *this;
}
Header

#include <experimental/future>

See Also