Skip to content

Commit fc77f77

Browse files
authored
fixed how product_type access is done (#180)
* fixed how product_type access is done * clang-format
1 parent e43fc56 commit fc77f77

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

include/beman/execution/detail/product_type.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,12 @@ struct product_type : ::beman::execution::detail::product_type_base<::std::index
9393
}
9494
template <typename Fun, ::std::size_t... I>
9595
constexpr auto apply_elements(::std::index_sequence<I...>, Fun&& fun) -> decltype(auto) {
96+
#if 0
9697
return ::std::forward<Fun>(fun)(this->template get<I>()...);
98+
#else
99+
//-dk:TODO provide rvalue, lvalue, const lvalue overloads?
100+
return ::std::forward<Fun>(fun)(std::move(this->template get<I>())...);
101+
#endif
97102
}
98103
template <typename Fun>
99104
constexpr auto apply(Fun&& fun) -> decltype(auto) {

tests/beman/execution/exec-scope-simple-counting.test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ auto mem() -> void {
109109
ASSERT(true == scope.get_token().try_associate());
110110
bool called{false};
111111
ASSERT(called == false);
112-
auto state(test_std::connect(scope.join(), join_receiver(called)));
112+
auto state(test_std::connect(scope.join(), join_receiver{called}));
113113
ASSERT(called == false);
114114
test_std::start(state);
115115
ASSERT(called == false);
@@ -126,7 +126,7 @@ auto token() -> void {
126126

127127
ASSERT(true == tok.try_associate());
128128
bool called{false};
129-
auto state(test_std::connect(scope.join(), join_receiver(called)));
129+
auto state(test_std::connect(scope.join(), join_receiver{called}));
130130
test_std::start(state);
131131
ASSERT(false == called);
132132
scope.close();

0 commit comments

Comments
 (0)