Namespaces
Variants
Views
Actions

std::future::future

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

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

<td >
future();
</td>

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

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

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

<td >
future( const future& other ) = delete;
</td>

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

Constructs a std::future object.

1) Default constructor. Constructs a std::future with no shared state. After construction, valid() == false.
2) Move constructor. Constructs a std::future with the shared state of other using move semantics. After construction, other.valid() == false.
3) std::future is not CopyConstructible.

Parameters

other - another std::future to acquire shared state from

Exceptions

1-2)
noexcept specification:  
noexcept