Namespaces
Variants
Actions

std::swap(std::promise)

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)
 
 
Defined in header <future>
template< class R >
void swap( promise<R>& lhs, promise<R>& rhs ) noexcept;
(since C++11)

Specializes the std::swap algorithm for std::promise . Exchanges the shared state of lhs with that of rhs. Effectively calls lhs.swap(rhs).

[edit] Parameters

lhs, rhs - promises whose states to swap

[edit] Return value

(none)

[edit] Example

This section is incomplete
Reason: no example

[edit] See also

swaps two promise objects
(public member function) [edit]
Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/thread/promise/swap2&oldid=157135"

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