Skip to content

The operation_state concept can be simplified #312

Open
@ericniebler

Description

@ericniebler

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

Proposed resolution:

Change the operation_state concept to:

template<class O>
  concept operation_state =
    derived_from<typename O::operation_state_concept, operation_state_t> &&
    requires (O& o) {
      start(o);
    };

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2bugSomething isn't workingpending-wg21A paper or an LWG issue exits

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions