名前空間
変種
操作

std::stop_source::operator=

提供: cppreference.com
< cpp‎ | thread‎ | stop source
 
 
スレッドサポートライブラリ
スレッド
(C++11)
(C++20)
(C++20)
this_thread 名前空間
(C++11)
(C++11)
(C++11)
相互排他
汎用ロック管理
(C++11)
(C++11)
(C++11)(C++11)(C++11)
(C++11)
(C++11)
条件変数
(C++11)
セマフォ
ラッチとバリア
(C++20)
(C++20)
フューチャー
(C++11)
(C++11)
(C++11)
 
 
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 の停止状態にムーブ代入します。 代入後、 *thisother の以前の停止状態を持つようになり、 other は停止状態を持たないようになります。 stop_source(std::move(other)).swap(*this) と同等です。

[編集]引数

other - 停止状態を共有するまたは取得する別の stop_source オブジェクト。

[編集]例外

(なし)

close