Namespaces
Variants
Actions

std::promise<R>::swap

From cppreference.com
< cpp‎ | thread‎ | promise
 
 
Concurrency support library
(C++11)
(C++20)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++17)
(C++11)
(C++11)
(C++17)
(C++11)
(C++14)
(C++11)
(C++11)
(C++11)
(C++11)
(C++20)
(C++20)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
(C++26)
(C++26)
(C++26)
(C++26)
(C++11)
(C++20)
(C++11)
(C++11)(deprecated in C++20)
(C++11)(deprecated in C++20)
(C++11)
(C++11)(deprecated in C++26)
 
 
void swap( promise& other ) noexcept;
(since C++11)

Exchanges the shared states of two promise objects.

[edit] Parameters

other - the promise to swap with

[edit] Return value

(none)

[edit] Example

This section is incomplete
Reason: no example

[edit] See also

specializes the std::swap algorithm
(function template) [edit]
Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/thread/promise/swap&oldid=161208"

AltStyle によって変換されたページ (->オリジナル) /