Namespaces
Variants
Views
Actions

std::promise::operator=

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

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

<td >
promise& operator=( promise&& other );
</td>

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

<td >
promise& operator=( const promise& rhs ) = delete;
</td>

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

Assigns the contents.

1) Move assignment operator. Assigns the shared state of other using move semantics. other is in valid, but undefined state afterwards.
2) promise is not copy-assignable.

Parameters

other - another promise to acquire the state from

Return value

*this

Exceptions

1)
noexcept specification:  
noexcept