Namespaces
Variants

std:: never_stop_token

From cppreference.net
Concurrency support library
Threads
(C++11)
(C++20)
this_thread namespace
(C++11)
(C++11)
Cooperative cancellation
(C++20)
never_stop_token
(C++26)
Mutual exclusion
Generic lock management
Condition variables
(C++11)
Semaphores
Latches and Barriers
(C++20)
(C++20)
Futures
(C++11)
(C++11)
(C++11)
Safe reclamation
Hazard pointers
Atomic types
(C++11)
(C++20)
Initialization of atomic types
(C++11) (deprecated in C++20)
(C++11) (deprecated in C++20)
Memory ordering
(C++11) (deprecated in C++26)
Free functions for atomic operations
Free functions for atomic flags
定義於ヘッダ <stop_token>
class never_stop_token ;
(C++26以降)

never_stop_token クラスは、停止が決して可能ではなく要求されないことを示す静的情報を提供する unstoppable_token をモデル化します。これは、クエリ可能なオブジェクトに関連付けられた他の停止トークンが提供されていない場合に std::get_stop_token によって返されるデフォルトの停止トークン型です。

目次

メンバーエイリアステンプレート

定義
callback_type < Callback > /*callback-type*/
型は以下のように定義される:
struct /*callback-type*/

{
explicit /*callback-type*/ ( never_stop_token,
auto && ) noexcept { }

} ;
( 説明専用* )

メンバー関数

stop_requested
[static]
停止要求が決して行われないことを示す
(public static member function)
stop_possible
[static]
停止が不可能であることを示す
(public static member function)
operator==
二つの never_stop_token オブジェクトを比較する
(public member function)

std::never_stop_token:: stop_requested

static constexpr bool stop_requested ( ) noexcept { return false ; }

常に false を返し、停止要求が行われることがないことを示します。

std::never_stop_token:: stop_possible

static constexpr bool stop_possible ( ) noexcept { return false ; }

常に false を返し、停止が不可能であることを示します。

std::never_stop_token:: operator==

bool operator == ( const never_stop_token & ) const = default ;

2つの never_stop_token オブジェクトは常に等価として比較されます。