Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Exchanges the associated asynchronous state of one promise object with that of another.
template<class Ty>
void swap(promise<Ty>& Left, promise<Ty>& Right) noexcept;
template<class Ty, class... ArgTypes>
void swap(packaged_task<Ty(ArgTypes...)>& Left,
packaged_task<Ty(ArgTypes...)>& Right) noexcept;
Parameters
Left
The left promise object.Right
The right promise object.
Requirements
Header: future
Namespace: std