MCPcopy Create free account
hub / github.com/NVIDIA/stdexec / __impls

Class __impls

include/stdexec/__detail/__let.hpp:523–678  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

521
522 template <class _LetTag>
523 struct __impls : __sexpr_defaults
524 {
525 private:
526 using __set_t = __t<_LetTag>;
527 using __eptr_sig_t = set_error_t(std::exception_ptr);
528
529 template <class _CvSender>
530 using __fn_t = __decay_t<__data_of<_CvSender>>;
531
532 template <class _CvSender, class _Env>
533 using __env2_t = __let::__result_env_t<__set_t, _CvSender, _Env>;
534
535 template <class _CvSender, class _Env>
536 using __rcvr2_t = __receiver_archetype<__env2_t<_CvSender, _Env>>;
537
538 template <class _CvSender, class _Receiver>
539 using __opstate_t = __gather_completions_of_t<
540 __set_t,
541 __child_of<_CvSender>,
542 __fwd_env_t<env_of_t<_Receiver>>,
543 __q<__decayed_tuple>,
544 __mbind_front_q<__opstate, __set_t, __child_of<_CvSender>, __fn_t<_CvSender>, _Receiver>>;
545
546 template <class _Fun, class _Child, class... _Env>
547 static constexpr auto __transform_cmplsig = //
548 []<class... _As>(__set_t (*)(_As...), __completion_info __info) //
549 -> decltype(auto)
550 {
551 if constexpr (!__decay_copyable<_As...>)
552 {
553 using __what_t = __not_decay_copyable_error_t<_LetTag, _As...>;
554 return STDEXEC::__throw_compile_time_error(__what_t());
555 }
556 else if constexpr (!__invocable<_Fun, __decay_t<_As>&...>)
557 {
558 using __what_t = __callable_error_t<_LetTag, _Fun, __decay_t<_As>&...>;
559 return STDEXEC::__throw_compile_time_error(__what_t());
560 }
561 else if constexpr (!__potentially_valid_sender_in<
562 __invoke_result_t<_Fun, __decay_t<_As>&...>,
563 __env2_t<_Child, _Env>...>)
564 {
565 using __sndr_t = __invoke_result_t<_Fun, __decay_t<_As>&...>;
566 using __what_t = __bad_result_sender<__sndr_t, _LetTag, __env2_t<_Child, _Env>...>;
567 return STDEXEC::__throw_compile_time_error(__what_t());
568 }
569 else
570 {
571 using __sndr2_t = __invoke_result_t<_Fun, __decay_t<_As>&...>;
572 auto __cmpls = STDEXEC::__get_completion_info<__sndr2_t, __env2_t<_Child, _Env>...>();
573 STDEXEC_IF_OK(__cmpls)
574 {
575 if constexpr (!__nothrow_decay_copyable<_As...>
576 || !__nothrow_invocable<_Fun, __decay_t<_As>&...>
577 || (!__nothrow_connectable<__sndr2_t, __rcvr2_t<_Child, _Env>> || ...))
578 {
579 __completion_info const __eptr_info(__signature<__eptr_sig_t>,
580 __info.__domain,

Callers

nothing calls this directly

Calls 4

__make_static_vectorFunction · 0.85
__transformClass · 0.85
get_envFunction · 0.70

Tested by

no test coverage detected