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
はコピー代入可能ではありません。
パラメータ
| その他 | - |
別の
promise
から状態を取得する
|
戻り値
* this