@@ -15,8 +15,8 @@ namespace beman::task::detail {
1515inline constexpr struct into_optional_t : beman::execution::sender_adaptor_closure<into_optional_t > {
1616 template <::beman::execution::sender Upstream>
1717 struct sender {
18- using upstream_t = std::remove_cvref_t <Upstream>;
1918 using sender_concept = ::beman::execution::sender_tag;
19+ using upstream_t = std::remove_cvref_t <Upstream>;
2020 upstream_t upstream;
2121
2222 template <typename ...>
@@ -48,22 +48,25 @@ inline constexpr struct into_optional_t : beman::execution::sender_adaptor_closu
4848 }
4949
5050 template <typename Env>
51- static auto get_type (Env&& ) {
51+ static consteval auto get_type () {
5252 return find_type (
5353 ::beman::execution::value_types_of_t <Upstream, std::remove_cvref_t <Env>, type_list, type_list>());
5454 }
5555
56- template <typename ... E, typename ... S>
57- constexpr auto make_signatures (auto && env, type_list<E...>, type_list<S...>) const {
56+ template <typename Env, typename ... E, typename ... S>
57+ static consteval auto make_signatures (type_list<E...>, type_list<S...>) {
5858 return ::beman::execution::completion_signatures<::beman::execution::set_value_t (
59- decltype (this -> get_type (env ))),
59+ decltype (get_type<Env>( ))),
6060 ::beman::execution::set_error_t (E)...,
6161 S...>();
6262 }
63- template <typename Env>
64- auto get_completion_signatures (Env&& env) const {
65- return make_signatures (
66- env,
63+ template <typename , typename Env>
64+ static consteval auto get_completion_signatures () {
65+ static_assert (::beman::execution::sender<Upstream>);
66+ static_assert (::beman::execution::sender_in<Upstream>);
67+ static_assert (::beman::execution::sender_in<Upstream, Env>);
68+ return make_signatures<Env>(
69+ ::beman::execution::value_types_of_t <Upstream, std::remove_cvref_t <Env>, type_list>{},
6770 ::beman::execution::error_types_of_t <Upstream, std::remove_cvref_t <Env>, type_list>{},
6871 std::conditional_t <::beman::execution::sends_stopped<Upstream, std::remove_cvref_t <Env>>,
6972 type_list<::beman::execution::set_stopped_t ()>,
@@ -73,7 +76,7 @@ inline constexpr struct into_optional_t : beman::execution::sender_adaptor_closu
7376 struct make_object {
7477 template <typename ... A>
7578 auto operator ()(A&&... a) const
76- -> decltype(get_type(::beman::execution::get_env(std::declval<Receiver>()))) {
79+ -> decltype(get_type< decltype (::beman::execution::get_env(std::declval<Receiver>()))>( )) {
7780 if constexpr (sizeof ...(A) == 0u )
7881 return {};
7982 else
0 commit comments