Skip to content

Commit 740ba54

Browse files
committed
applied some fixes
1 parent d05077e commit 740ba54

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

include/beman/execution26/detail/basic_sender.hpp

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include <beman/execution26/detail/sender.hpp>
1313
#include <beman/execution26/detail/sender_decompose.hpp>
1414
#include <beman/execution26/detail/connect.hpp>
15-
#include <beman/execution26/detail/get_completion_signatures.hpp>
15+
#include <beman/execution26/detail/get_completion_behaviour.hpp>
1616
#include <utility>
1717

1818
#include <beman/execution26/detail/suppress_push.hpp>
@@ -39,7 +39,23 @@ struct basic_sender : ::beman::execution26::detail::product_type<Tag, Data, Chil
3939
data.children);
4040
}
4141

42-
template <class Self, class Env>
42+
#if __cpp_explicit_this_parameter < 302110L //-dk:TODO need to figure out how to use explicit this with forwarding
43+
template <class Env>
44+
constexpr auto get_completion_behaviour(Env&& env) noexcept -> decltype(auto) {
45+
return []<typename Self>(Self&& self, Env&& env) ->decltype(auto) {
46+
auto data{::beman::execution26::detail::get_sender_data(self)};
47+
return ::std::apply(
48+
[&data, &env](auto&&... cs) {
49+
return ::beman::execution26::detail::impls_for<Tag>::get_completion_behaviour(
50+
::std::forward<Env>(env),
51+
::beman::execution26::detail::forward_like<Self>(data.data),
52+
::beman::execution26::detail::forward_like<Self>(cs)...);
53+
},
54+
::beman::execution26::detail::forward_like<Self>(data.children));
55+
}(*this, ::std::forward<Env>(env));
56+
}
57+
#else
58+
template <class Env>
4359
constexpr auto get_completion_behaviour(this Self&& self, Env&& env) noexcept -> decltype(auto) {
4460
auto data{::beman::execution26::detail::get_sender_data(self)};
4561
return ::std::apply(
@@ -51,6 +67,7 @@ struct basic_sender : ::beman::execution26::detail::product_type<Tag, Data, Chil
5167
},
5268
::beman::execution26::detail::forward_like<Self>(data.children));
5369
}
70+
#endif
5471

5572
template <typename Receiver>
5673
requires(not ::beman::execution26::receiver<Receiver>)

include/beman/execution26/detail/default_impls.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <beman/execution26/detail/product_type.hpp>
1515
#include <beman/execution26/detail/sender_decompose.hpp>
1616
#include <beman/execution26/detail/start.hpp>
17+
#include <beman/execution26/detail/get_completion_behaviour.hpp>
1718

1819
#include <utility>
1920

0 commit comments

Comments
 (0)