std::stop_source:: operator=
From cppreference.net
<
cpp
|
thread
|
stop source
C++
Concurrency support library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::stop_source
| Member functions | ||||
|
stop_source::operator=
|
||||
| Modifiers | ||||
| Observers | ||||
| Non-member functions | ||||
| Helper tags | ||||
|
std::
stop_source
&
operator
=
(
const
std::
stop_source
&
other
)
noexcept
;
|
(1) | (начиная с C++20) |
|
std::
stop_source
&
operator
=
(
std::
stop_source
&&
other
)
noexcept
;
|
(2) | (начиная с C++20) |
Заменяет состояние остановки на состояние из other .
1)
Копирует состояние остановки из
other
в
*
this
. Эквивалентно
stop_source
(
other
)
.
swap
(
*
this
)
.
2)
Перемещает состояние остановки из
other
в текущий объект
*
this
. После присваивания
*
this
содержит предыдущее состояние остановки
other
, а
other
не имеет состояния остановки. Эквивалентно
stop_source
(
std
::
move
(
other
)
)
.
swap
(
*
this
)
.
Параметры
| other | - |
another
stop_source
object to share the stop-state with to or acquire the stop-state from
|