Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The operation_state concept can be simplified #312

Open
ericniebler opened this issue Jan 14, 2025 · 0 comments
Open

The operation_state concept can be simplified #312

ericniebler opened this issue Jan 14, 2025 · 0 comments
Labels
bug Something isn't working P2

Comments

@ericniebler
Copy link
Collaborator

ericniebler commented Jan 14, 2025

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);
    };
@ericniebler ericniebler added bug Something isn't working P1 labels Jan 14, 2025
@ericniebler ericniebler added P2 and removed P1 labels Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P2
Projects
None yet
Development

No branches or pull requests

1 participant