diff --git a/include/stdexec/__detail/__basic_sender.hpp b/include/stdexec/__detail/__basic_sender.hpp index 59eb1448a..d64ba987b 100644 --- a/include/stdexec/__detail/__basic_sender.hpp +++ b/include/stdexec/__detail/__basic_sender.hpp @@ -236,6 +236,19 @@ namespace STDEXEC using receiver_concept = receiver_tag; using __index_t = __msize_t<_Idx>; +#if STDEXEC_APPLE_CLANG() + // These constructors are a work-around for bad codegen with apple-clang + STDEXEC_ATTRIBUTE(always_inline) + constexpr explicit __rcvr(_State& __state) noexcept + : __state_(__state) + {} + + STDEXEC_ATTRIBUTE(always_inline) + constexpr __rcvr(__rcvr const & __other) noexcept + : __state_(__other.__state_) + {} +#endif // STDEXEC_APPLE_CLANG() + template STDEXEC_ATTRIBUTE(always_inline) constexpr void set_value(_Args&&... __args) noexcept