34 Execution control library [exec]

34.5 Queries [exec.queries]

34.5.3 get_stop_token [exec.get.stop.token]

get_stop_token asks a queryable object for an associated stop token.
The name get_stop_token denotes a query object.
For a subexpression env, get_stop_token(env) is expression-equivalent to:
  • MANDATE-NOTHROW(as_const(env).query(get_stop_token)) if that expression is well-formed.
    Mandates: The type of the expression above satisfies stoppable_token.
  • Otherwise, never_stop_token{}.
forwarding_query(get_stop_token) is a core constant expression and has value true.