Skip to content

Commit 533ae06

Browse files
committed
add suppport to __sexpr for consteval get_completion_signatures
1 parent 0e99835 commit 533ae06

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

include/stdexec/__detail/__basic_sender.hpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,10 @@ namespace STDEXEC {
363363
template <std::size_t _Idx, class _Descriptor>
364364
concept __in_range = (_Idx < sizeof(__minvoke<_Descriptor, __q<__tuple_size_t>>));
365365

366+
template <class _Tag, class _Self, class... _Env>
367+
concept __has_static_consteval_get_completion_signatures = requires {
368+
_Tag::template get_completion_signatures<_Self, _Env...>();
369+
};
366370
} // namespace __detail
367371

368372
using __sexpr_defaults = __detail::__defaults;
@@ -519,7 +523,11 @@ namespace STDEXEC {
519523
template <__decays_to_derived_from<__sexpr> _Self, class... _Env>
520524
static consteval auto get_completion_signatures() {
521525
using __impl_t = __mtypeof<__impl<_Self>::get_completion_signatures>;
522-
if constexpr (__callable<__impl_t, _Self, _Env...>) {
526+
using __detail::__has_static_consteval_get_completion_signatures;
527+
528+
if constexpr (__has_static_consteval_get_completion_signatures<__tag_t, _Self, _Env...>) {
529+
return __impl_t::template get_completion_signatures<_Self, _Env...>();
530+
} else if constexpr (__callable<__impl_t, _Self, _Env...>) {
523531
return __call_result_t<__impl_t, _Self, _Env...>();
524532
} else if constexpr (sizeof...(_Env) == 0) {
525533
return __dependent_sender<_Self>();

0 commit comments

Comments
 (0)