| 59 | __mconst<STDEXEC::completion_signatures<>>::__f>; |
| 60 | |
| 61 | struct __into_tuple_impl : __sexpr_defaults |
| 62 | { |
| 63 | template <class _Receiver, class _Tuple> |
| 64 | struct __state |
| 65 | { |
| 66 | using __tuple_t = _Tuple; |
| 67 | STDEXEC_IMMOVABLE_NO_UNIQUE_ADDRESS |
| 68 | _Receiver __rcvr_; |
| 69 | }; |
| 70 | |
| 71 | template <class _Sender, class... _Env> |
| 72 | static consteval auto __get_completion_signatures() |
| 73 | { |
| 74 | // TODO: port this to use constant evaluation |
| 75 | return __completions_t<__child_of<_Sender>, _Env...>{}; |
| 76 | } |
| 77 | |
| 78 | static constexpr auto __get_state = |
| 79 | []<class _Sender, class _Receiver>(_Sender &&, _Receiver &&__rcvr) |
| 80 | { |
| 81 | using __tuple_t = __result_tuple_t<__child_of<_Sender>, env_of_t<_Receiver>>; |
| 82 | return __state<_Receiver, __tuple_t>{static_cast<_Receiver &&>(__rcvr)}; |
| 83 | }; |
| 84 | |
| 85 | static constexpr auto __complete = |
| 86 | []<class _State, class _Tag, class... _Args>(__ignore, |
| 87 | _State &__state, |
| 88 | _Tag, |
| 89 | _Args &&...__args) noexcept -> void |
| 90 | { |
| 91 | if constexpr (__std::same_as<_Tag, set_value_t>) |
| 92 | { |
| 93 | using __tuple_t = _State::__tuple_t; |
| 94 | STDEXEC_TRY |
| 95 | { |
| 96 | set_value(static_cast<_State &&>(__state).__rcvr_, |
| 97 | __tuple_t{static_cast<_Args &&>(__args)...}); |
| 98 | } |
| 99 | STDEXEC_CATCH_ALL |
| 100 | { |
| 101 | STDEXEC::set_error(static_cast<_State &&>(__state).__rcvr_, std::current_exception()); |
| 102 | } |
| 103 | } |
| 104 | else |
| 105 | { |
| 106 | _Tag()(static_cast<_State &&>(__state).__rcvr_, static_cast<_Args &&>(__args)...); |
| 107 | } |
| 108 | }; |
| 109 | }; |
| 110 | |
| 111 | struct into_tuple_t |
| 112 | { |