From 6699dded931ea4647cb23a0460570f3b85c10efd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dietmar=20K=C3=BChl?= Date: Wed, 13 Aug 2025 00:10:50 +0100 Subject: [PATCH 1/2] fixed how product_type access is done --- include/beman/execution/detail/product_type.hpp | 5 +++++ tests/beman/execution/exec-scope-simple-counting.test.cpp | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/beman/execution/detail/product_type.hpp b/include/beman/execution/detail/product_type.hpp index f81f2da8..c757072f 100644 --- a/include/beman/execution/detail/product_type.hpp +++ b/include/beman/execution/detail/product_type.hpp @@ -93,7 +93,12 @@ struct product_type : ::beman::execution::detail::product_type_base<::std::index } template constexpr auto apply_elements(::std::index_sequence, Fun&& fun) -> decltype(auto) { + #if 0 return ::std::forward(fun)(this->template get()...); + #else + //-dk:TODO provide rvalue, lvalue, const lvalue overloads? + return ::std::forward(fun)(std::move(this->template get())...); + #endif } template constexpr auto apply(Fun&& fun) -> decltype(auto) { diff --git a/tests/beman/execution/exec-scope-simple-counting.test.cpp b/tests/beman/execution/exec-scope-simple-counting.test.cpp index bd505c8f..5ea147ad 100644 --- a/tests/beman/execution/exec-scope-simple-counting.test.cpp +++ b/tests/beman/execution/exec-scope-simple-counting.test.cpp @@ -109,7 +109,7 @@ auto mem() -> void { ASSERT(true == scope.get_token().try_associate()); bool called{false}; ASSERT(called == false); - auto state(test_std::connect(scope.join(), join_receiver(called))); + auto state(test_std::connect(scope.join(), join_receiver{called})); ASSERT(called == false); test_std::start(state); ASSERT(called == false); @@ -126,7 +126,7 @@ auto token() -> void { ASSERT(true == tok.try_associate()); bool called{false}; - auto state(test_std::connect(scope.join(), join_receiver(called))); + auto state(test_std::connect(scope.join(), join_receiver{called})); test_std::start(state); ASSERT(false == called); scope.close(); From 4d698e1efd86ed1a0156b262bce79bb0a7547f5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dietmar=20K=C3=BChl?= Date: Wed, 13 Aug 2025 00:11:56 +0100 Subject: [PATCH 2/2] clang-format --- include/beman/execution/detail/product_type.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/beman/execution/detail/product_type.hpp b/include/beman/execution/detail/product_type.hpp index c757072f..59c4f395 100644 --- a/include/beman/execution/detail/product_type.hpp +++ b/include/beman/execution/detail/product_type.hpp @@ -93,12 +93,12 @@ struct product_type : ::beman::execution::detail::product_type_base<::std::index } template constexpr auto apply_elements(::std::index_sequence, Fun&& fun) -> decltype(auto) { - #if 0 +#if 0 return ::std::forward(fun)(this->template get()...); - #else +#else //-dk:TODO provide rvalue, lvalue, const lvalue overloads? return ::std::forward(fun)(std::move(this->template get())...); - #endif +#endif } template constexpr auto apply(Fun&& fun) -> decltype(auto) {