diff --git a/include/boost/capy/concept/executor.hpp b/include/boost/capy/concept/executor.hpp index d7582d9ff..cf2b1ac95 100644 --- a/include/boost/capy/concept/executor.hpp +++ b/include/boost/capy/concept/executor.hpp @@ -166,7 +166,7 @@ template concept Executor = std::is_nothrow_copy_constructible_v && std::is_nothrow_move_constructible_v && - requires(E& e, E const& ce, E const& ce2, continuation c) { + requires(E& e, E const& ce, E const& ce2, continuation& c) { { ce == ce2 } noexcept -> std::convertible_to; { ce.context() } noexcept; requires std::is_lvalue_reference_v && diff --git a/include/boost/capy/ex/executor_ref.hpp b/include/boost/capy/ex/executor_ref.hpp index f6010b7bd..245f16871 100644 --- a/include/boost/capy/ex/executor_ref.hpp +++ b/include/boost/capy/ex/executor_ref.hpp @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -149,7 +150,8 @@ class executor_ref std::decay_t, executor_ref>, int> = 0> #else template - requires (!std::same_as, executor_ref>) + requires (!std::same_as, executor_ref> + && Executor) #endif executor_ref(Ex const& ex) noexcept : ex_(&ex) @@ -266,7 +268,7 @@ class executor_ref `nullptr` if the type does not match. */ template< typename Executor > - const Executor* target() const + const Executor* target() const noexcept { if ( *vt_->type_id == detail::type_id< Executor >() ) return static_cast< Executor const* >( ex_ ); @@ -275,7 +277,7 @@ class executor_ref /// @copydoc target() const template< typename Executor> - Executor* target() + Executor* target() noexcept { if ( *vt_->type_id == detail::type_id< Executor >() ) return const_cast< Executor* >(