Title
The `operation_state` concept can be simplified
Status
ready
Section
[exec.opstate.general]
Submitter
Eric Niebler

Created on 2025-02-03.00:00:00 last changed 3 months ago

Messages

Date: 2025-02-07.22:53:52

Proposed resolution:

This wording is relative to N5001.

  1. Modify [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;
        };
    
Date: 2025-02-15.00:00:00

[ 2025-02-07; Reflector poll ]

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

Date: 2025-02-06.17:04:04

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()`.

History
Date User Action Args
2025-02-07 22:53:52adminsetmessages: + msg14623
2025-02-07 22:53:52adminsetstatus: new -> ready
2025-02-03 13:49:48adminsetmessages: + msg14558
2025-02-03 00:00:00admincreate