From ba3abd3501d544423432cfee5aeedd969159ff45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dietmar=20K=C3=BChl?= Date: Fri, 10 Jan 2025 08:31:11 +0000 Subject: [PATCH] Fix coro issues (#114) * fixed a few coroutine related issues * fixed formatting issues * reverted te chnage checking the result from unhandled_stopped(). * addressed and issue which resulted in requiring a copy ctor * removed a static_assert left for testing * clang-format --- include/beman/execution26/detail/basic_operation.hpp | 6 ++++-- include/beman/execution26/detail/continues_on.hpp | 4 +++- include/beman/execution26/detail/sync_wait.hpp | 6 ++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/include/beman/execution26/detail/basic_operation.hpp b/include/beman/execution26/detail/basic_operation.hpp index 27f045a9..414ff67e 100644 --- a/include/beman/execution26/detail/basic_operation.hpp +++ b/include/beman/execution26/detail/basic_operation.hpp @@ -26,8 +26,10 @@ namespace beman::execution26::detail { */ template requires ::beman::execution26::detail:: - valid_specialization<::beman::execution26::detail::state_type, Sender, Receiver> - struct basic_operation : ::beman::execution26::detail::basic_state { + //-dk:TODO why is the remove_cvref_t needed...? + valid_specialization<::beman::execution26::detail::state_type, std::remove_cvref_t, Receiver> +struct basic_operation : ::beman::execution26::detail::basic_state { + // static_assert(std::same_as>); friend struct ::beman::execution26::start_t; using operation_state_concept = ::beman::execution26::operation_state_t; using tag_t = ::beman::execution26::tag_of_t; diff --git a/include/beman/execution26/detail/continues_on.hpp b/include/beman/execution26/detail/continues_on.hpp index c0ca832a..49bd8c56 100644 --- a/include/beman/execution26/detail/continues_on.hpp +++ b/include/beman/execution26/detail/continues_on.hpp @@ -50,7 +50,9 @@ struct continues_on_t { auto operator()(Sender&& sender, Scheduler&& scheduler) const { auto domain(::beman::execution26::detail::get_domain_early(sender)); return ::beman::execution26::transform_sender( - domain, ::beman::execution26::detail::make_sender(*this, scheduler, ::std::forward(sender))); + domain, + ::beman::execution26::detail::make_sender( + *this, std::forward(scheduler), ::std::forward(sender))); } }; diff --git a/include/beman/execution26/detail/sync_wait.hpp b/include/beman/execution26/detail/sync_wait.hpp index b474d988..8e76695d 100644 --- a/include/beman/execution26/detail/sync_wait.hpp +++ b/include/beman/execution26/detail/sync_wait.hpp @@ -75,7 +75,7 @@ struct sync_wait_receiver { struct sync_wait_t { template - auto apply_sender(Sender&& sender) { + auto apply_sender(Sender&& sender) const { ::beman::execution26::detail::sync_wait_state state; auto op{::beman::execution26::connect(::std::forward(sender), ::beman::execution26::detail::sync_wait_receiver{&state})}; @@ -93,7 +93,9 @@ struct sync_wait_t { typename ::beman::execution26::detail::sync_wait_result_type; { ::beman::execution26::apply_sender( - ::beman::execution26::detail::get_domain_early(sender), self, ::std::forward(sender)) + ::beman::execution26::detail::get_domain_early(std::forward(sender)), + self, + ::std::forward(sender)) } -> ::std::same_as<::beman::execution26::detail::sync_wait_result_type>; } auto operator()(Sender&& sender) const {