Exchange ownership of the asynchronous results associated with two std::promise
objects.
void swap(promise& other);
- Effects:
Exchange ownership of the asynchronous results associated with
otherand*this.- Postconditions:
The asynchronous result associated with
otherprior to the invocation ofswap(if any) is associated with*this. The asynchronous result associated with*thisprior to the invocation ofswap(if any) is associated withother- Throws:
Nothing.
Header
#include <future>