A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://en.cppreference.com/w/cpp/language/../error/error_code/../../thread/stoppable_token.html below:

std::stoppable_token - cppreference.com

template< class Token >

concept stoppable_token =
    requires (const Token tok) {
        typename /*check-type-alias-exists*/<Token::template callback_type>;
        { tok.stop_requested() } noexcept -> std::same_as<bool>;
        { tok.stop_possible() } noexcept -> std::same_as<bool>;
        { Token(tok) } noexcept; // see implicit expression variations
    } &&
    std::copyable<Token> &&

    std::equality_comparable<Token>;
(since C++26)

Helper templates

template< template<class> class >
struct /*check-type-alias-exists*/; // not defined

(exposition only*)

The concept stoppable_token<Token> specifies the basic interface of a stop token that is copyable and equality_comparable and allows polling to see if the stop request is possible and whether the request has been made.

[edit] Semantic requirements [edit] See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4