From d744c0b32204221fd70da86b35dbbbc014574b13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dietmar=20K=C3=BChl?= Date: Thu, 29 May 2025 20:48:25 +0100 Subject: [PATCH] fixed a problem with when_all missing set_stopped completions --- include/beman/execution/detail/when_all.hpp | 7 ++++++- src/beman/execution/CMakeLists.txt | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/include/beman/execution/detail/when_all.hpp b/include/beman/execution/detail/when_all.hpp index 0af45779..40f130f7 100644 --- a/include/beman/execution/detail/when_all.hpp +++ b/include/beman/execution/detail/when_all.hpp @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -250,7 +251,11 @@ struct completion_signatures_for_impl< type; using error_types = ::beman::execution::detail::meta::unique< ::beman::execution::detail::meta::combine<::beman::execution::error_types_of_t...>>; - using type = ::beman::execution::detail::meta::combine; + using stopped_types = + ::std::conditional_t<(false || ... || ::beman::execution::sends_stopped), + ::beman::execution::completion_signatures<::beman::execution::set_stopped_t()>, + ::beman::execution::completion_signatures<>>; + using type = ::beman::execution::detail::meta::combine; }; } // namespace beman::execution::detail diff --git a/src/beman/execution/CMakeLists.txt b/src/beman/execution/CMakeLists.txt index ea6aecae..c55afcc4 100644 --- a/src/beman/execution/CMakeLists.txt +++ b/src/beman/execution/CMakeLists.txt @@ -27,6 +27,8 @@ target_sources( ${PROJECT_SOURCE_DIR}/include/beman/execution/execution.hpp ${PROJECT_SOURCE_DIR}/include/beman/execution/functional.hpp ${PROJECT_SOURCE_DIR}/include/beman/execution/stop_token.hpp + ${PROJECT_SOURCE_DIR}/include/beman/execution26/execution.hpp + ${PROJECT_SOURCE_DIR}/include/beman/execution26/stop_token.hpp PUBLIC FILE_SET ${TARGET_NAME}_detail_headers TYPE @@ -47,6 +49,7 @@ target_sources( ${PROJECT_SOURCE_DIR}/include/beman/execution/detail/basic_receiver.hpp ${PROJECT_SOURCE_DIR}/include/beman/execution/detail/basic_sender.hpp ${PROJECT_SOURCE_DIR}/include/beman/execution/detail/basic_state.hpp + ${PROJECT_SOURCE_DIR}/include/beman/execution/detail/bulk.hpp ${PROJECT_SOURCE_DIR}/include/beman/execution/detail/call_result_t.hpp ${PROJECT_SOURCE_DIR}/include/beman/execution/detail/callable.hpp ${PROJECT_SOURCE_DIR}/include/beman/execution/detail/check_type_alias_exist.hpp