std:: swap (std::promise)
From cppreference.net
C++
Concurrency support library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::promise
| Member functions | ||||
| Getting the result | ||||
| Setting the result | ||||
| Non-member Functions | ||||
|
swap
(std::promise)
|
||||
| Helper Classes | ||||
|
헤더에 정의됨
<future>
|
||
|
template
<
class
R
>
void swap ( promise < R > & lhs, promise < R > & rhs ) noexcept ; |
(C++11 이후) | |
std::swap 알고리즘을 std::promise 에 대해 특수화합니다. lhs 의 공유 상태를 rhs 의 공유 상태와 교환합니다. 효과적으로 lhs. swap ( rhs ) 를 호출합니다.
목차 |
매개변수
| lhs, rhs | - | 상태를 교환할 promise들 |
반환값
(없음)
예제
|
이 섹션은 불완전합니다
이유: 예시가 없음 |
참고 항목
|
두 promise 객체를 교환합니다
(public member function) |