Namespaces
Variants
Views
Actions

std::shared_future::operator=

From cppreference.com
< cpp‎ | thread‎ | shared future
Revision as of 19:45, 2 November 2012 by P12bot (Talk | contribs)

Template:ddcl list begin <tr class="t-dcl ">

<td >
 
</td>

<td > (1) </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">

<td >
 
</td>

<td > (1) </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">

<td >
shared_future( future<R>&& other );
</td>

<td > (1) </td> <td > (since C++11) </td> </tr> <tr class="t-dcl ">

<td >
shared_future( shared_future&& other );
</td>

<td > (1) </td> <td > (since C++11) </td> </tr> Template:ddcl list end

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