std::never_stop_token
From cppreference.com
C++
Feature test macros (C++20)
Concepts library (C++20)
Metaprogramming library (C++11)
Ranges library (C++20)
Filesystem library (C++17)
Concurrency support library (C++11)
Execution control library (C++26)
Concurrency support library
(C++11)
(C++20)
(C++11)
(C++11)
(C++20)
(C++26)
never_stop_token
(C++26)
(C++20)
(C++26)
(C++20)
(C++26)
(C++26)
(C++26)
(C++26)
(C++26)
(C++26)
(C++11)
(C++11)
(C++17)
(C++11)
(C++14)
(C++11)
(C++11)
(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)
(C++11)
(C++11)
(C++26)
(C++26)
(C++26)
(C++11)
(C++20)
(C++11)
(C++11)(deprecated in C++20)
(C++11)(deprecated in C++20)
(C++11)
(C++11)
(C++11)(deprecated in C++26)
(C++11)
(C++11)
(C++11)(C++11)
(C++11)(C++11)
(C++11)(C++11)
(C++11)(C++11)
(C++11)(C++11)
(C++11)(C++11)
(C++11)(C++11)
(C++11)(C++11)
(C++26)(C++26)
(C++26)(C++26)
(C++11)
(C++20)(C++20)
(C++20)
(C++20)
(C++11)(C++11)
(C++11)(C++11)
(C++20)(C++20)
(C++20)(C++20)
(C++20)
(C++20)
Defined in header
<stop_token>
class never_stop_token;
(since C++26)
The never_stop_token
class models unstoppable_token
that provides static information that a stop is never possible nor requested. It is the default stop token type returned by std::get_stop_token
if no other associated stop token is being provided in the queryable object.
Contents
[edit] Member alias templates
Type
Definition
callback_type<Callback>
/*callback-type*/
where the type is defined as:
where the type is defined as:
struct /*callback-type*/
(exposition only*)
{
explicit /*callback-type*/( never_stop_token,
auto&& ) noexcept {}
[edit] Member functions
stop_requested
[static]
(public static member function)
stop_possible
[static]
(public static member function)
operator==
never_stop_token
objects (public member function)
std::never_stop_token::stop_requested
static constexpr bool stop_requested() noexcept { return false; }
Always returns false, indicating that a stop can never be requested.
std::never_stop_token::stop_possible
static constexpr bool stop_possible() noexcept { return false; }
Always returns false, indicating that a stop is not possible.
std::never_stop_token::operator==
bool operator==(const never_stop_token&) const = default;
Two never_stop_token
objects always compare equal.
[edit] Example
This section is incomplete
Reason: no example
Reason: no example