std::stop_token:: operator=
From cppreference.net
<
cpp
|
thread
|
stop token
C++
Concurrency support library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::stop_token
| Member functions | ||||
|
stop_token::operator=
|
||||
| Modifiers | ||||
| Observers | ||||
| Non-member functions | ||||
|
std::
stop_token
&
operator
=
(
const
std::
stop_token
&
other
)
noexcept
;
|
(1) | (C++20以降) |
|
std::
stop_token
&
operator
=
(
std::
stop_token
&&
other
)
noexcept
;
|
(2) | (C++20以降) |
関連付けられた停止状態を other のものと置き換えます。
1)
other
の関連する停止状態を
*
this
の関連する停止状態にコピー代入する。
stop_token
(
other
)
.
swap
(
*
this
)
と等価。
2)
other
の関連付けられた停止状態を
*
this
の関連付けられた停止状態にムーブ代入する。代入後、
*
this
は
other
の以前の関連付けられた停止状態を含み、
other
は関連付けられた停止状態を持たない。
stop_token
(
std
::
move
(
other
)
)
.
swap
(
*
this
)
と等価。
パラメータ
| other | - |
別の
stop_token
オブジェクトと停止状態を共有する、または停止状態を取得する
|