std::promise<R>:: operator=
From cppreference.net
C++
Concurrency support library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::promise
| Member functions | ||||
|
promise::operator=
|
||||
| Getting the result | ||||
| Setting the result | ||||
| Non-member Functions | ||||
| Helper Classes | ||||
|
promise
&
operator
=
(
promise
&&
other
)
noexcept
;
|
(1) | (C++11부터) |
|
promise
&
operator
=
(
const
promise
&
rhs
)
=
delete
;
|
(2) | (C++11부터) |
내용을 할당합니다.
1)
이동 할당 연산자. 먼저 공유 상태를 포기하고(마치
~promise()
에서처럼), 그런 다음
other
의 공유 상태를 다음과 같이 실행하는 것처럼 할당합니다:
std::
promise
(
std
::
move
(
other
)
)
.
swap
(
*
this
)
.
2)
promise
는 복사 할당이 불가능합니다.
매개변수
| other | - |
상태를 획득할 다른
promise
|
반환값
* this