Skip to content

Commit c9e9807

Browse files
committed
Fix __let.hpp __let_t<Tag> get_completion_signatures() computation.
__get_transform_fn actually requires __child_t a sender_in<_Env...>.
1 parent f91f636 commit c9e9807

1 file changed

Lines changed: 21 additions & 13 deletions

File tree

include/stdexec/__detail/__let.hpp

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -624,23 +624,31 @@ namespace STDEXEC
624624
static_assert(__sender_for<_CvSender, _LetTag>);
625625
using __child_t = __child_of<_CvSender>;
626626
auto __completions = STDEXEC::get_completion_signatures<__child_t, _Env...>();
627-
auto __transform = __get_transform_fn<__fn_t<_CvSender>, __child_t, _Env...>();
628-
if constexpr (!__decay_copyable<_CvSender>)
629-
{
630-
return STDEXEC::__throw_compile_time_error<_SENDER_TYPE_IS_NOT_DECAY_COPYABLE_,
631-
_WITH_PRETTY_SENDER_<_CvSender>>();
632-
}
633-
else if constexpr (__t<_LetTag>() == STDEXEC::set_value)
634-
{
635-
return STDEXEC::__transform_completion_signatures(__completions, __transform);
636-
}
637-
else if constexpr (__t<_LetTag>() == STDEXEC::set_error)
627+
628+
if constexpr (STDEXEC::sender_in<__child_t, _Env...>)
638629
{
639-
return STDEXEC::__transform_completion_signatures(__completions, {}, __transform);
630+
auto __transform = __get_transform_fn<__fn_t<_CvSender>, __child_t, _Env...>();
631+
if constexpr (!__decay_copyable<_CvSender>)
632+
{
633+
return STDEXEC::__throw_compile_time_error<_SENDER_TYPE_IS_NOT_DECAY_COPYABLE_,
634+
_WITH_PRETTY_SENDER_<_CvSender>>();
635+
}
636+
else if constexpr (__t<_LetTag>() == STDEXEC::set_value)
637+
{
638+
return STDEXEC::__transform_completion_signatures(__completions, __transform);
639+
}
640+
else if constexpr (__t<_LetTag>() == STDEXEC::set_error)
641+
{
642+
return STDEXEC::__transform_completion_signatures(__completions, {}, __transform);
643+
}
644+
else
645+
{
646+
return STDEXEC::__transform_completion_signatures(__completions, {}, {}, __transform);
647+
}
640648
}
641649
else
642650
{
643-
return STDEXEC::__transform_completion_signatures(__completions, {}, {}, __transform);
651+
return __completions;
644652
}
645653
}
646654

0 commit comments

Comments
 (0)