Namespaces
Variants
Views
Actions

std::promise::operator=

From cppreference.com
< cpp‎ | thread‎ | promise
Revision as of 08:24, 15 August 2013 by P12 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
promise& operator=( promise&& other );
(1) (since C++11)
promise& operator=( const promise& rhs ) = delete;
(2) (since C++11)

Assigns the contents.

1) Move assignment operator. First, abandons the shared state (as in ~promise()), then assigns the shared state of other as if by executing std::promise(std::move(other)).swap(*this).
2) promise is not copy-assignable.

[edit] Parameters

other - another promise to acquire the state from

[edit] Return value

*this

[edit] Exceptions

1)
noexcept specification:  
noexcept