diff --git a/include/beman/execution/detail/product_type.hpp b/include/beman/execution/detail/product_type.hpp index f81f2da8..59c4f395 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/include/beman/execution/execution.hpp b/include/beman/execution/execution.hpp index 9619c704..973eeecc 100644 --- a/include/beman/execution/execution.hpp +++ b/include/beman/execution/execution.hpp @@ -38,6 +38,7 @@ #include #include +#include #include #include #include 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();