4200. The operation_state concept can be simplified

Section: 33.8.1 [exec.opstate.general] Status: Tentatively Ready Submitter: Eric Niebler Opened: 2025-02-03 Last modified: 2025-02-07

Priority: Not Prioritized

View all issues with Tentatively Ready status.

Discussion:

Imported from cplusplus/sender-receiver #312.

The current defn of the operation_state concept is:


template<class O>
  concept operation_state =
    derived_from<typename O::operation_state_concept, operation_state_t> &&
    is_object_v<O> &&
    requires (O& o) {
      { start(o) } noexcept;
    };
I think the is_object_v<O> constraint is not needed because the derived_from constraint has already established that O is a class type.

And start(o) is always noexcept now that start mandates the noexcept-ness of op.start().

[2025-02-07; Reflector poll]

Set status to Tentatively Ready after seven votes in favour during reflector poll.

Proposed resolution:

This wording is relative to N5001.

  1. Modify 33.8.1 [exec.opstate.general] as indicated:
    
    template<class O>
      concept operation_state =
        derived_from<typename O::operation_state_concept, operation_state_t> &&
        is_object_v<O> &&
        requires (O& o) {
          { start(o) } noexcept;
        };