diff --git a/include/stdexec/__detail/__sender_adaptor_closure.hpp b/include/stdexec/__detail/__sender_adaptor_closure.hpp index 102d1a56f..868cbcb5c 100644 --- a/include/stdexec/__detail/__sender_adaptor_closure.hpp +++ b/include/stdexec/__detail/__sender_adaptor_closure.hpp @@ -93,7 +93,8 @@ namespace STDEXEC { template requires __callable<_Fn, _Sender, _As...> STDEXEC_ATTRIBUTE(host, device, always_inline) - auto operator()(_Sender&& __sndr) && noexcept(__nothrow_callable<_Fn, _Sender, _As...>) { + constexpr auto + operator()(_Sender&& __sndr) && noexcept(__nothrow_callable<_Fn, _Sender, _As...>) { return STDEXEC::__apply( static_cast<_Fn&&>(__fn_), static_cast<__tuple<_As...>&&>(__args_), @@ -103,7 +104,7 @@ namespace STDEXEC { template requires __callable STDEXEC_ATTRIBUTE(host, device, always_inline) - auto operator()(_Sender&& __sndr) const & noexcept( + constexpr auto operator()(_Sender&& __sndr) const & noexcept( __nothrow_callable) { return STDEXEC::__apply(__fn_, __args_, static_cast<_Sender&&>(__sndr)); } diff --git a/include/stdexec/__detail/__tuple.hpp b/include/stdexec/__detail/__tuple.hpp index 52ce15d21..f6818d3fd 100644 --- a/include/stdexec/__detail/__tuple.hpp +++ b/include/stdexec/__detail/__tuple.hpp @@ -219,9 +219,10 @@ namespace STDEXEC { template using __tuple_t = __mcall<_CvRef, __tuple<_Ts...>>; - template ...> _Fn> - void operator()(_Fn&& __fn, __tuple_t<_Ts...>&& __tupl, _Us&&... __us) const - noexcept(__nothrow_callable<_Fn, _Us..., __mcall<_CvRef, _Ts>...>); + template ...> _Fn> + auto operator()(_Fn&& __fn, __tuple_t<_Ts...>&& __tupl, _Us&&... __us) const + noexcept(__nothrow_callable<_Fn, _Us..., __mcall1<_CvRef, _Ts>...>) + -> __call_result_t<_Fn, _Us..., __mcall1<_CvRef, _Ts>...>; }; template @@ -232,7 +233,8 @@ namespace STDEXEC { requires __callable<__impl_t<_Tuple>, _Fn, _Tuple, _Us...> STDEXEC_ATTRIBUTE(always_inline, host, device) constexpr auto operator()(_Fn&& __fn, _Tuple&& __tupl, _Us&&... __us) const - noexcept(__nothrow_callable<__impl_t<_Tuple>, _Fn, _Tuple, _Us...>) -> decltype(auto) { + noexcept(__nothrow_callable<__impl_t<_Tuple>, _Fn, _Tuple, _Us...>) + -> __call_result_t<__impl_t<_Tuple>, _Fn, _Tuple, _Us...> { constexpr size_t __size = STDEXEC_REMOVE_REFERENCE(_Tuple)::__size; if constexpr (__size == 0) {