kokkos-execution 0.0.1
Loading...
Searching...
No Matches
Tests::Utils::operation_state Concept Reference

A stricter variant of stdexec::operation_state. More...

#include <stdexec.hpp>

Concept definition

template<typename OpState>
concept Tests::Utils::operation_state = stdexec::operation_state<OpState> && requires(OpState& opstate) {
{ opstate.start() } noexcept -> std::same_as<void>;
}
A stricter variant of stdexec::operation_state.
Definition stdexec.hpp:37

Detailed Description

A stricter variant of stdexec::operation_state.

stdexec::operation_state intentionally omits these requirements from its constraints: it checks that the type is a destructible object and has a start() member invocable via stdexec::start, but leaves the noexcept and void return as mandates. This produces targeted diagnostics when a user forgets noexcept on their start() member.

This concept strengthens stdexec::operation_state by additionally constraining that start() be callable on an lvalue, return void, and be noexcept, making the concept a faithful predicate for "startable" given both constraints and mandates from the stdexec framework.

Note
See https://github.com/NVIDIA/stdexec/pull/2003 and [1] for the design rationale behind the mandates-vs-constraints choice in the standard.

Definition at line 37 of file stdexec.hpp.