On this page
std::promise<R>::operator=
|
(1) | (since C++11) |
|
(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.
Parameters
other | - | another promise to acquire the state from |
Return value
*this
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/cpp/thread/promise/operator%3D