Namespaces
Variants
Views
Actions

std::shared_future::operator=

From cppreference.com
< cpp‎ | thread‎ | shared future
Revision as of 16:48, 1 July 2013 by P12bot (Talk | contribs)

shared_future& operator=(const shared_future& rhs);
(1) (since C++11)
shared_future& operator=(shared_future&& rhs) noexcept;
(2) (since C++11)
shared_future& operator=(future<R>&& other);
(3) (since C++11)
shared_future& operator=(shared_future&& other);
(4) (since C++11)

Constructs a new shared_future.

1) Default constructor. Constructs an empty shared future, that doesn't refer to a shared state, that is valid() == false.
2) Constructs a shared future that refers to the same shared state, as other, if there's any.
3-4) Move constructor. Transfers the shared state held by other to *this. After the construction, other->valid() == false, also valid() returns the same value as other.valid() would have returned before the construction.

Parameters

other - another future object to initialize with

Exceptions

1) (none)
2)
noexcept specification:  
noexcept