std::stop_source:: operator=
From cppreference.com
< cpp | thread | stop source
| 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 の stop-state で、stop-state を置き換えます。
1) *this の stop-state に、other の stop-state をコピー代入します。これは、stop_source(other).swap(*this) と同等です。
2) *this の stop-state に、other の stop-state をムーブ代入します。代入後、*this は other の以前の stop-state を含み、other は stop-state を持ちません。これは、stop_source(std::move(other)).swap(*this) と同等です。
[編集] パラメータ
| その他 | - | stop-state を共有する、または stop-state を取得する別の stop_source オブジェクト |