std::shared_future<T>:: operator=
From cppreference.net
<
cpp
|
thread
|
shared future
C++
Concurrency support library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::shared_future
| Member functions | ||||
|
shared_future::operator=
|
||||
| Getting the result | ||||
| State | ||||
| (1) | ||
|
shared_future
&
operator
=
(
const
shared_future
&
other
)
;
|
(C++11부터)
(C++17까지) |
|
|
shared_future
&
operator
=
(
const
shared_future
&
other
)
noexcept
;
|
(C++17부터) | |
|
shared_future
&
operator
=
(
shared_future
&&
other
)
noexcept
;
|
(2) | (C++11부터) |
다른
shared_future
의 내용을 할당합니다.
1)
공유 상태를 해제하고
other
의 내용을
*
this
에 할당합니다. 할당 후에는
this
-
>
valid
(
)
==
other.
valid
(
)
입니다.
2)
공유 상태를 해제하고
other
의 내용을
*
this
로 이동 할당합니다. 할당 후에는
other.
valid
(
)
==
false
가 되며,
this->valid()
는 할당 전
other.
valid
(
)
가 반환하던 값과 동일한 값을 반환합니다.
매개변수
| other | - |
상태를
std::shared_future
에서
*
this
로 이전할
|
반환값
* this