From f2986ca54b782e9a6ed271587d136aa3d24388e2 Mon Sep 17 00:00:00 2001 From: Eric Niebler Date: Mon, 2 Mar 2026 15:21:26 -0800 Subject: [PATCH 1/4] move `sender_expr[_for]` concepts out of the STDEXEC namespace --- include/exec/detail/shared.hpp | 2 +- include/exec/ensure_started.hpp | 3 ++- include/exec/libdispatch_queue.hpp | 6 ++++- include/exec/sender_for.hpp | 26 +++++++++++++++++++ include/exec/sequence/ignore_all_values.hpp | 5 ++-- include/exec/sequence/iterate.hpp | 7 +++-- include/exec/sequence/merge.hpp | 7 ++--- include/exec/sequence/merge_each.hpp | 8 +++--- include/exec/sequence/transform_each.hpp | 11 +++++--- include/exec/split.hpp | 3 ++- include/exec/static_thread_pool.hpp | 7 ++--- include/exec/thread_pool_base.hpp | 7 ++--- include/exec/unless_stop_requested.hpp | 4 ++- include/nvexec/stream/common.cuh | 3 ++- include/stdexec/__detail/__affine_on.hpp | 2 +- include/stdexec/__detail/__associate.hpp | 2 +- include/stdexec/__detail/__bulk.hpp | 2 +- include/stdexec/__detail/__continues_on.hpp | 4 +-- include/stdexec/__detail/__into_variant.hpp | 2 +- include/stdexec/__detail/__just.hpp | 2 +- include/stdexec/__detail/__let.hpp | 4 +-- .../stdexec/__detail/__parallel_scheduler.hpp | 4 +-- include/stdexec/__detail/__read_env.hpp | 2 +- include/stdexec/__detail/__schedule_from.hpp | 2 +- .../__detail/__sender_introspection.hpp | 11 ++++++-- include/stdexec/__detail/__stop_when.hpp | 2 +- .../__detail/__stopped_as_optional.hpp | 4 +-- include/stdexec/__detail/__then.hpp | 2 +- include/stdexec/__detail/__upon_error.hpp | 2 +- include/stdexec/__detail/__upon_stopped.hpp | 2 +- include/stdexec/__detail/__when_all.hpp | 2 +- include/stdexec/__detail/__write_env.hpp | 2 +- test/exec/sequence/test_ignore_all_values.cpp | 2 +- test/exec/sequence/test_iterate.cpp | 6 ++--- test/exec/sequence/test_merge.cpp | 3 ++- test/exec/sequence/test_transform_each.cpp | 3 ++- test/exec/test_fork_join.cpp | 2 +- test/exec/test_task.cpp | 3 ++- test/stdexec/algos/adaptors/test_bulk.cpp | 5 ++-- .../algos/adaptors/test_continues_on.cpp | 7 ++--- .../stdexec/algos/adaptors/test_let_error.cpp | 3 ++- .../algos/adaptors/test_let_stopped.cpp | 3 ++- .../stdexec/algos/adaptors/test_let_value.cpp | 3 ++- .../stdexec/algos/adaptors/test_starts_on.cpp | 3 ++- test/stdexec/algos/adaptors/test_then.cpp | 3 ++- .../algos/adaptors/test_transfer_when_all.cpp | 9 ++++--- test/stdexec/algos/adaptors/test_when_all.cpp | 9 ++++--- .../algos/factories/test_transfer_just.cpp | 3 ++- .../schedulers/test_task_scheduler.cpp | 3 ++- 49 files changed, 145 insertions(+), 77 deletions(-) create mode 100644 include/exec/sender_for.hpp diff --git a/include/exec/detail/shared.hpp b/include/exec/detail/shared.hpp index 9b99c6a65..96751e24c 100644 --- a/include/exec/detail/shared.hpp +++ b/include/exec/detail/shared.hpp @@ -496,7 +496,7 @@ namespace experimental::execution::__shared template static consteval auto __get_completion_signatures() { - static_assert(sender_expr_for<_CvSender, _Tag>); + static_assert(STDEXEC::__sender_for<_CvSender, _Tag>); return __get_completion_signatures_impl<__child_of<_CvSender>, __decay_t<__data_of<_CvSender>>>(); }; diff --git a/include/exec/ensure_started.hpp b/include/exec/ensure_started.hpp index 9fdcb293e..1c06cef0c 100644 --- a/include/exec/ensure_started.hpp +++ b/include/exec/ensure_started.hpp @@ -23,6 +23,7 @@ #include "../stdexec/__detail/__senders.hpp" #include "../stdexec/__detail/__transform_sender.hpp" #include "detail/shared.hpp" +#include "sender_for.hpp" namespace experimental::execution { @@ -68,7 +69,7 @@ namespace experimental::execution static constexpr auto transform_sender(STDEXEC::set_value_t, _CvSender&& __sndr, STDEXEC::__ignore) { - static_assert(STDEXEC::sender_expr_for<_CvSender, ensure_started_t>); + static_assert(sender_for<_CvSender, ensure_started_t>); auto __result = __shared::__sndr{ensure_started_t(), STDEXEC::__get<2>(static_cast<_CvSender&&>(__sndr)), STDEXEC::__get<1>(static_cast<_CvSender&&>(__sndr))}; diff --git a/include/exec/libdispatch_queue.hpp b/include/exec/libdispatch_queue.hpp index 3a7f79d7b..5a0625822 100644 --- a/include/exec/libdispatch_queue.hpp +++ b/include/exec/libdispatch_queue.hpp @@ -28,6 +28,9 @@ # endif # include "../stdexec/execution.hpp" + +# include "sender_for.hpp" + # include namespace experimental::execution @@ -91,9 +94,10 @@ namespace experimental::execution struct domain { // transform the generic bulk sender into a parallel libdispatch bulk sender - template Sender, class Env> + template auto transform_sender(STDEXEC::set_value_t, Sender &&sndr, Env const &env) const noexcept { + static_assert(sender_for); if constexpr (STDEXEC::__completes_on) { auto sched = diff --git a/include/exec/sender_for.hpp b/include/exec/sender_for.hpp new file mode 100644 index 000000000..5c87e2466 --- /dev/null +++ b/include/exec/sender_for.hpp @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2022 NVIDIA Corporation + * + * Licensed under the Apache License Version 2.0 with LLVM Exceptions + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * https://llvm.org/LICENSE.txt + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#pragma once + +#include "../stdexec/__detail/__sender_introspection.hpp" + +namespace experimental::execution +{ + template + concept sender_for = STDEXEC::__sender_for<_Sender, _Tag...>; +} // namespace experimental::execution + +namespace exec = experimental::execution; diff --git a/include/exec/sequence/ignore_all_values.hpp b/include/exec/sequence/ignore_all_values.hpp index b505c8b69..3d6a9fce7 100644 --- a/include/exec/sequence/ignore_all_values.hpp +++ b/include/exec/sequence/ignore_all_values.hpp @@ -21,6 +21,7 @@ // include these after execution.hpp #include "../../stdexec/__detail/__tuple.hpp" #include "../../stdexec/__detail/__variant.hpp" +#include "../sender_for.hpp" #include "../sequence_senders.hpp" #include "../../stdexec/__detail/__atomic.hpp" @@ -316,7 +317,7 @@ namespace experimental::execution template static consteval auto __get_completion_signatures() { - static_assert(sender_expr_for<_Sender, ignore_all_values_t>); + static_assert(sender_for<_Sender, ignore_all_values_t>); return __sequence_completion_signatures_of<__child_of<_Sender>, _Env...>(); } @@ -325,7 +326,7 @@ namespace experimental::execution __nothrow_applicable<__connect_fn, _Sender, _Receiver&>) -> __apply_result_t<__connect_fn, _Sender, _Receiver&> { - static_assert(sender_expr_for<_Sender, ignore_all_values_t>); + static_assert(sender_for<_Sender, ignore_all_values_t>); return __apply(__connect_fn(), static_cast<_Sender&&>(__sndr), __rcvr); }; }; diff --git a/include/exec/sequence/iterate.hpp b/include/exec/sequence/iterate.hpp index d784557b1..5754d7dd8 100644 --- a/include/exec/sequence/iterate.hpp +++ b/include/exec/sequence/iterate.hpp @@ -24,6 +24,7 @@ # include "../../stdexec/execution.hpp" # include "../detail/basic_sequence.hpp" +# include "../sender_for.hpp" # include "../sequence.hpp" # include "../sequence_senders.hpp" # include "../trampoline_scheduler.hpp" @@ -203,13 +204,14 @@ namespace experimental::execution template using _NextSender = next_sender_of_t<_Receiver, __item_sender_t<_Sequence>>; - template _SeqExpr, + template >> _Receiver> requires sender_to<_NextSender<_SeqExpr, _Receiver>, _NextReceiver<_SeqExpr, _Receiver>> static constexpr auto subscribe(_SeqExpr&& __seq, _Receiver __rcvr) noexcept(__nothrow_applicable<__subscribe_fn<_Receiver>, _SeqExpr>) -> __apply_result_t<__subscribe_fn<_Receiver>, _SeqExpr> { + static_assert(sender_for<_SeqExpr, iterate_t>); return __apply(__subscribe_fn<_Receiver>{__rcvr}, static_cast<_SeqExpr&&>(__seq)); } @@ -221,9 +223,10 @@ namespace experimental::execution set_stopped_t()>(); } - template _Sequence, class... _Env> + template static consteval auto get_item_types() noexcept { + static_assert(sender_for<_Sequence, iterate_t>); return item_types<__item_sender_t<_Sequence>>(); } diff --git a/include/exec/sequence/merge.hpp b/include/exec/sequence/merge.hpp index 48d1c80cc..69263e42c 100644 --- a/include/exec/sequence/merge.hpp +++ b/include/exec/sequence/merge.hpp @@ -19,6 +19,7 @@ #include "../../stdexec/execution.hpp" #include "../detail/basic_sequence.hpp" +#include "../sender_for.hpp" #include "../sequence_senders.hpp" #include "ignore_all_values.hpp" #include "transform_each.hpp" @@ -175,7 +176,7 @@ namespace experimental::execution template static consteval auto get_completion_signatures() noexcept { - static_assert(STDEXEC::sender_expr_for<_Self, merge_t>); + static_assert(sender_for<_Self, merge_t>); auto __items = STDEXEC::__children_of<_Self, STDEXEC::__qq>(); return exec::concat_completion_signatures( completion_signatures(), @@ -185,7 +186,7 @@ namespace experimental::execution template static consteval auto get_item_types() { - static_assert(sender_expr_for<_Self, merge_t>); + static_assert(sender_for<_Self, merge_t>); auto __items = STDEXEC::__children_of<_Self, STDEXEC::__qq>(); return __items.__transform(__mk_get_item_types<_Env...>(), __mk_unique_concat_items()); } @@ -195,7 +196,7 @@ namespace experimental::execution noexcept(__nothrow_applicable<__subscribe_fn, _Self, _Receiver&>) -> __apply_result_t<__subscribe_fn, _Self, _Receiver&> { - static_assert(sender_expr_for<_Self, merge_t>); + static_assert(sender_for<_Self, merge_t>); return STDEXEC::__apply(__subscribe_fn{}, static_cast<_Self&&>(__self), __rcvr); } }; diff --git a/include/exec/sequence/merge_each.hpp b/include/exec/sequence/merge_each.hpp index b85b53c1d..8a4b04b53 100644 --- a/include/exec/sequence/merge_each.hpp +++ b/include/exec/sequence/merge_each.hpp @@ -33,6 +33,7 @@ #include "../../stdexec/__detail/__transform_completion_signatures.hpp" #include "../../stdexec/__detail/__variant.hpp" #include "../detail/basic_sequence.hpp" +#include "../sender_for.hpp" #include @@ -1277,9 +1278,10 @@ namespace experimental::execution return make_sequence_expr(__(), static_cast<_Sequence&&>(__sequence)); } - template _Self, class... _Env> + template static consteval auto get_item_types() { + static_assert(sender_for<_Self, merge_each_t>); using __result_t = __compute::__nested_values_t<__child_of<_Self>, __env_with_inplace_stop_token_result_t<_Env>...>; @@ -1310,7 +1312,7 @@ namespace experimental::execution template static consteval auto get_completion_signatures() { - static_assert(sender_expr_for<_Self, merge_each_t>); + static_assert(sender_for<_Self, merge_each_t>); // TODO: update this to use constant evaluation: using __result_t = __minvoke<__mtry_q<__completions_t>, _Self, @@ -1331,7 +1333,7 @@ namespace experimental::execution __nothrow_applicable<__subscribe_fn<_Receiver>, _Sequence>) -> __apply_result_t<__subscribe_fn<_Receiver>, _Sequence> { - static_assert(sender_expr_for<_Sequence, merge_each_t>); + static_assert(sender_for<_Sequence, merge_each_t>); return __apply(__subscribe_fn<_Receiver>{__rcvr}, static_cast<_Sequence&&>(__sndr)); }; }; diff --git a/include/exec/sequence/transform_each.hpp b/include/exec/sequence/transform_each.hpp index 8e04a4541..1b04f8172 100644 --- a/include/exec/sequence/transform_each.hpp +++ b/include/exec/sequence/transform_each.hpp @@ -18,6 +18,7 @@ #include "../../stdexec/concepts.hpp" #include "../../stdexec/execution.hpp" +#include "../sender_for.hpp" #include "../sequence_senders.hpp" #include "../detail/basic_sequence.hpp" @@ -155,7 +156,7 @@ namespace experimental::execution template static consteval auto get_completion_signatures() { - static_assert(sender_expr_for<_Self, transform_each_t>); + static_assert(sender_for<_Self, transform_each_t>); return exec::__sequence_completion_signatures_of<__child_of<_Self>, _Env...>(); } @@ -170,7 +171,7 @@ namespace experimental::execution template static consteval auto get_item_types() { - static_assert(sender_expr_for<_Self, transform_each_t>); + static_assert(sender_for<_Self, transform_each_t>); using __closure_t = STDEXEC::__decay_t<__data_of<_Self>>&; auto __child_items = exec::get_item_types<__child_of<_Self>, _Env...>(); @@ -206,17 +207,19 @@ namespace experimental::execution template using __operation_t = __operation<__child_of<_Self>, _Receiver, __data_of<_Self>>; - template _Self, receiver _Receiver> + template static auto subscribe(_Self&& __self, _Receiver __rcvr) noexcept(__nothrow_applicable<__subscribe_fn<_Receiver>, _Self>) -> __apply_result_t<__subscribe_fn<_Receiver>, _Self> { + static_assert(sender_for<_Self, transform_each_t>); return __apply(__subscribe_fn<_Receiver>{__rcvr}, static_cast<_Self&&>(__self)); } - template _Sexpr> + template static auto get_env(_Sexpr const & __sexpr) noexcept -> env_of_t<__child_of<_Sexpr>> { + static_assert(sender_for<_Sexpr, transform_each_t>); return __apply([](__ignore, __ignore, _Child const & __child) { return STDEXEC::get_env(__child); }, __sexpr); diff --git a/include/exec/split.hpp b/include/exec/split.hpp index fe270abb6..a345b1376 100644 --- a/include/exec/split.hpp +++ b/include/exec/split.hpp @@ -23,6 +23,7 @@ #include "../stdexec/__detail/__senders.hpp" #include "../stdexec/__detail/__transform_sender.hpp" #include "detail/shared.hpp" +#include "sender_for.hpp" namespace experimental::execution { @@ -51,7 +52,7 @@ namespace experimental::execution static constexpr auto transform_sender(STDEXEC::set_value_t, _CvSender&& __sndr, STDEXEC::__ignore) { - static_assert(STDEXEC::sender_expr_for<_CvSender, split_t>); + static_assert(sender_for<_CvSender, split_t>); return __shared::__sndr{split_t(), STDEXEC::__get<2>(static_cast<_CvSender&&>(__sndr)), STDEXEC::__get<1>(static_cast<_CvSender&&>(__sndr))}; diff --git a/include/exec/static_thread_pool.hpp b/include/exec/static_thread_pool.hpp index 23c3f45fc..4425a4a65 100644 --- a/include/exec/static_thread_pool.hpp +++ b/include/exec/static_thread_pool.hpp @@ -28,6 +28,7 @@ #include "detail/numa.hpp" #include "detail/xorshift.hpp" +#include "sender_for.hpp" #include "sequence/iterate.hpp" #include "sequence_senders.hpp" @@ -275,7 +276,7 @@ namespace experimental::execution struct domain : STDEXEC::default_domain { // transform the generic bulk_chunked sender into a parallel thread-pool bulk sender - template + template requires __one_of, bulk_chunked_t, bulk_unchunked_t> constexpr auto transform_sender(STDEXEC::set_value_t, Sender&& sndr, Env const & env) const noexcept @@ -301,9 +302,9 @@ namespace experimental::execution } #if !STDEXEC_NO_STDCPP_RANGES() - template Sender, class Env> + template Sender, class Env> constexpr auto - transform_sender(STDEXEC::set_value_t, Sender&& sndr, const Env& env) const noexcept + transform_sender(STDEXEC::set_value_t, Sender&& sndr, Env const & env) const noexcept { if constexpr (__completes_on) { diff --git a/include/exec/thread_pool_base.hpp b/include/exec/thread_pool_base.hpp index 3bf0f0ab7..98d73a927 100644 --- a/include/exec/thread_pool_base.hpp +++ b/include/exec/thread_pool_base.hpp @@ -17,7 +17,8 @@ */ #pragma once -#include +#include "sender_for.hpp" +#include "static_thread_pool.hpp" namespace experimental::execution { @@ -54,7 +55,7 @@ namespace experimental::execution struct domain : STDEXEC::default_domain { - template Sender, class Env> + template Sender, class Env> static constexpr auto transform_sender(STDEXEC::set_value_t, Sender&& sndr, Env const & env) { auto& [tag, data, child] = sndr; @@ -84,7 +85,7 @@ namespace experimental::execution } } - template Sender, class Env> + template Sender, class Env> static constexpr auto transform_sender(STDEXEC::set_value_t, Sender&& sndr, Env const & env); }; diff --git a/include/exec/unless_stop_requested.hpp b/include/exec/unless_stop_requested.hpp index b0cff3b00..8988a935f 100644 --- a/include/exec/unless_stop_requested.hpp +++ b/include/exec/unless_stop_requested.hpp @@ -21,6 +21,8 @@ #include "../stdexec/__detail/__receiver_ref.hpp" #include "../stdexec/execution.hpp" +#include "sender_for.hpp" + namespace experimental::execution { namespace __unless_stop_requested @@ -90,7 +92,7 @@ namespace experimental::execution template static consteval auto __get_completion_signatures() { - static_assert(sender_expr_for<_Self, unless_stop_requested_t>); + static_assert(sender_for<_Self, unless_stop_requested_t>); // TODO: port this to use constant evaluation return __completions_t<__child_of<_Self>, _Env>{}; }; diff --git a/include/nvexec/stream/common.cuh b/include/nvexec/stream/common.cuh index 9186c2482..5933da9c7 100644 --- a/include/nvexec/stream/common.cuh +++ b/include/nvexec/stream/common.cuh @@ -28,6 +28,7 @@ #include #include +#include "../../exec/sender_for.hpp" // IWYU pragma: keep for sender_for #include "../detail/config.cuh" #include "../detail/cuda_atomic.cuh" // IWYU pragma: keep #include "../detail/queue.cuh" @@ -96,7 +97,7 @@ namespace nv::execution // algorithms use the current scheduler's domain to transform senders before starting them. struct stream_domain : STDEXEC::default_domain { - template , class Env> + template , class Env> requires STDEXEC::__applicable<_strm::transform_sender_for, Sender, Env const &> static auto transform_sender(STDEXEC::set_value_t, Sender&& sndr, Env const & env) { diff --git a/include/stdexec/__detail/__affine_on.hpp b/include/stdexec/__detail/__affine_on.hpp index 74240f642..d40308883 100644 --- a/include/stdexec/__detail/__affine_on.hpp +++ b/include/stdexec/__detail/__affine_on.hpp @@ -64,7 +64,7 @@ namespace STDEXEC template static constexpr auto transform_sender(set_value_t, _Sender &&__sndr, _Env const &__env) { - static_assert(sender_expr_for<_Sender, affine_on_t>); + static_assert(__sender_for<_Sender, affine_on_t>); auto &[__tag, __ign, __child] = __sndr; using __child_t = decltype(__child); using __cv_child_t = __copy_cvref_t<_Sender, __child_t>; diff --git a/include/stdexec/__detail/__associate.hpp b/include/stdexec/__detail/__associate.hpp index df1c17534..c22b53013 100644 --- a/include/stdexec/__detail/__associate.hpp +++ b/include/stdexec/__detail/__associate.hpp @@ -250,7 +250,7 @@ namespace STDEXEC __completion_signatures_of_t<__wrap_sender_of_t<_Sender>, _Env...>, completion_signatures> { - static_assert(sender_expr_for<_Sender, associate_t>); + static_assert(__sender_for<_Sender, associate_t>); return {}; }; diff --git a/include/stdexec/__detail/__bulk.hpp b/include/stdexec/__detail/__bulk.hpp index fcf67758b..041071cb6 100644 --- a/include/stdexec/__detail/__bulk.hpp +++ b/include/stdexec/__detail/__bulk.hpp @@ -260,7 +260,7 @@ namespace STDEXEC template static consteval auto __get_completion_signatures() { - static_assert(sender_expr_for<_Sender, _AlgoTag>); + static_assert(__sender_for<_Sender, _AlgoTag>); // TODO: port this to use constant evaluation return __completion_signatures<_AlgoTag, __fun_t<_Sender>, diff --git a/include/stdexec/__detail/__continues_on.hpp b/include/stdexec/__detail/__continues_on.hpp index 3ec37fffb..e6c8e53ca 100644 --- a/include/stdexec/__detail/__continues_on.hpp +++ b/include/stdexec/__detail/__continues_on.hpp @@ -355,7 +355,7 @@ namespace STDEXEC template static consteval auto __get_completion_signatures() { - static_assert(sender_expr_for<_Sender, continues_on_t>); + static_assert(__sender_for<_Sender, continues_on_t>); using __scheduler_t = __decay_t<__data_of<_Sender>>; using __child_t = __child_of<_Sender>; auto __child_completions = __get_child_completions<__child_t, _Env...>(); @@ -371,7 +371,7 @@ namespace STDEXEC _Receiver&& __rcvr) -> __state_for_t<_Sender, _Receiver> requires sender_in<__child_of<_Sender>, __fwd_env_t>> { - static_assert(sender_expr_for<_Sender, continues_on_t>); + static_assert(__sender_for<_Sender, continues_on_t>); auto& [__tag, __sched, __child] = __sndr; return __state_for_t<_Sender, _Receiver>{__sched, static_cast<_Receiver&&>(__rcvr)}; }; diff --git a/include/stdexec/__detail/__into_variant.hpp b/include/stdexec/__detail/__into_variant.hpp index d574b5cee..d2939a8ac 100644 --- a/include/stdexec/__detail/__into_variant.hpp +++ b/include/stdexec/__detail/__into_variant.hpp @@ -100,7 +100,7 @@ namespace STDEXEC template static consteval auto __get_completion_signatures() { - static_assert(sender_expr_for<_Self, into_variant_t>); + static_assert(__sender_for<_Self, into_variant_t>); return __completions<__child_of<_Self>, _Env...>{}; }; }; diff --git a/include/stdexec/__detail/__just.hpp b/include/stdexec/__detail/__just.hpp index 6ff783a73..a9a3e7fbb 100644 --- a/include/stdexec/__detail/__just.hpp +++ b/include/stdexec/__detail/__just.hpp @@ -68,7 +68,7 @@ namespace STDEXEC template static consteval auto __get_completion_signatures() { - static_assert(sender_expr_for<_Sender, _JustTag>); + static_assert(__sender_for<_Sender, _JustTag>); return completion_signatures<__mapply<__qf<__set_tag_t>, __decay_t<__data_of<_Sender>>>>{}; } diff --git a/include/stdexec/__detail/__let.hpp b/include/stdexec/__detail/__let.hpp index 475b9bd13..bdf17961a 100644 --- a/include/stdexec/__detail/__let.hpp +++ b/include/stdexec/__detail/__let.hpp @@ -659,7 +659,7 @@ namespace STDEXEC template static consteval auto __get_completion_signatures() { - static_assert(sender_expr_for<_Sender, _LetTag>); + static_assert(__sender_for<_Sender, _LetTag>); if constexpr (__decay_copyable<_Sender>) { // TODO: update this to use constant evaluation @@ -688,7 +688,7 @@ namespace STDEXEC __data_of<_CvSender>, _Receiver>) -> __opstate_t<_CvSender, _Receiver> { - static_assert(sender_expr_for<_CvSender, _LetTag>); + static_assert(__sender_for<_CvSender, _LetTag>); auto& [__tag, __fn, __child] = __sndr; return __opstate_t<_CvSender, _Receiver>(STDEXEC::__forward_like<_CvSender>(__child), STDEXEC::__forward_like<_CvSender>(__fn), diff --git a/include/stdexec/__detail/__parallel_scheduler.hpp b/include/stdexec/__detail/__parallel_scheduler.hpp index d62dae5de..6dcb39f3b 100644 --- a/include/stdexec/__detail/__parallel_scheduler.hpp +++ b/include/stdexec/__detail/__parallel_scheduler.hpp @@ -70,8 +70,8 @@ namespace STDEXEC /// Concept that matches `bulk_chunked` and `bulk_unchunked` senders. template - concept __bulk_chunked_or_unchunked = sender_expr_for<_Sender, bulk_chunked_t> - || sender_expr_for<_Sender, bulk_unchunked_t>; + concept __bulk_chunked_or_unchunked = __sender_for<_Sender, bulk_chunked_t> + || __sender_for<_Sender, bulk_unchunked_t>; /// The execution domain of the parallel_scheduler, used for the purposes of customizing /// sender algorithms such as `bulk_chunked` and `bulk_unchunked`. diff --git a/include/stdexec/__detail/__read_env.hpp b/include/stdexec/__detail/__read_env.hpp index 837fa3b4e..f25e1fe29 100644 --- a/include/stdexec/__detail/__read_env.hpp +++ b/include/stdexec/__detail/__read_env.hpp @@ -140,7 +140,7 @@ namespace STDEXEC [](_Sender const &, _Receiver&& __rcvr) noexcept requires std::is_reference_v<__call_result_t<__data_of<_Sender>, env_of_t<_Receiver>>> { - static_assert(sender_expr_for<_Sender, __read_env_t>); + static_assert(__sender_for<_Sender, __read_env_t>); using __query_t = __data_of<_Sender>; STDEXEC::__set_value_from(static_cast<_Receiver&&>(__rcvr), __query_t(), diff --git a/include/stdexec/__detail/__schedule_from.hpp b/include/stdexec/__detail/__schedule_from.hpp index d6ba43917..e92d9d580 100644 --- a/include/stdexec/__detail/__schedule_from.hpp +++ b/include/stdexec/__detail/__schedule_from.hpp @@ -50,7 +50,7 @@ namespace STDEXEC template static consteval auto __get_completion_signatures() { - static_assert(sender_expr_for<_Sender, schedule_from_t>); + static_assert(__sender_for<_Sender, schedule_from_t>); return STDEXEC::get_completion_signatures<__child_of<_Sender>, _Env...>(); } }; diff --git a/include/stdexec/__detail/__sender_introspection.hpp b/include/stdexec/__detail/__sender_introspection.hpp index 41aa52a82..93b02572c 100644 --- a/include/stdexec/__detail/__sender_introspection.hpp +++ b/include/stdexec/__detail/__sender_introspection.hpp @@ -172,9 +172,16 @@ namespace STDEXEC template struct __mfor<__sexpr<_Descriptor> const &> : decltype(_Descriptor()){}; + template + concept __sender_for = sender<_Sender> && __minvocable_q + && (__std::same_as, _Tag> && ...); + template - concept sender_expr = __minvocable_q; + concept sender_expr STDEXEC_DEPRECATE_CONCEPT("Please use sender_for from " + "instead") = __sender_for<_Sender>; template - concept sender_expr_for = sender_expr<_Sender> && __std::same_as, _Tag>; + concept sender_expr_for + STDEXEC_DEPRECATE_CONCEPT("Please use sender_for from " + " instead") = __sender_for<_Sender, _Tag>; } // namespace STDEXEC diff --git a/include/stdexec/__detail/__stop_when.hpp b/include/stdexec/__detail/__stop_when.hpp index 6dbe8166c..8a337beec 100644 --- a/include/stdexec/__detail/__stop_when.hpp +++ b/include/stdexec/__detail/__stop_when.hpp @@ -71,7 +71,7 @@ namespace STDEXEC static consteval auto __get_completion_signatures() // -> __completion_signatures_of_t<__child_of<_Sender>, _Env...> { - static_assert(sender_expr_for<_Sender, __stop_when_t>); + static_assert(__sender_for<_Sender, __stop_when_t>); return {}; }; diff --git a/include/stdexec/__detail/__stopped_as_optional.hpp b/include/stdexec/__detail/__stopped_as_optional.hpp index cbeb6911c..6eb24b1d4 100644 --- a/include/stdexec/__detail/__stopped_as_optional.hpp +++ b/include/stdexec/__detail/__stopped_as_optional.hpp @@ -65,7 +65,7 @@ namespace STDEXEC template static constexpr auto __get_completion_signatures() { - static_assert(sender_expr_for<_Self, stopped_as_optional_t>); + static_assert(__sender_for<_Self, stopped_as_optional_t>); STDEXEC_COMPLSIGS_LET(__completions, STDEXEC::get_completion_signatures<__child_of<_Self>, _Env...>()) { @@ -94,7 +94,7 @@ namespace STDEXEC -> __state<_Receiver, __value_type_t<_Self, _Receiver>> requires sender_in<__child_of<_Self>, env_of_t<_Receiver>> { - static_assert(sender_expr_for<_Self, stopped_as_optional_t>); + static_assert(__sender_for<_Self, stopped_as_optional_t>); using __value_t = __value_type_t<_Self, _Receiver>; return __state<_Receiver, __value_t>{static_cast<_Receiver&&>(__rcvr)}; }; diff --git a/include/stdexec/__detail/__then.hpp b/include/stdexec/__detail/__then.hpp index 0c70c4d0e..f95feadee 100644 --- a/include/stdexec/__detail/__then.hpp +++ b/include/stdexec/__detail/__then.hpp @@ -53,7 +53,7 @@ namespace STDEXEC static consteval auto __get_completion_signatures() // -> __completions_t<__decay_t<__data_of<_Sender>>, __child_of<_Sender>, _Env...> { - static_assert(sender_expr_for<_Sender, then_t>); + static_assert(__sender_for<_Sender, then_t>); // TODO: update this to use constant evaluation: return {}; }; diff --git a/include/stdexec/__detail/__upon_error.hpp b/include/stdexec/__detail/__upon_error.hpp index 98f7b1de8..b4fd6cb5b 100644 --- a/include/stdexec/__detail/__upon_error.hpp +++ b/include/stdexec/__detail/__upon_error.hpp @@ -47,7 +47,7 @@ namespace STDEXEC static consteval auto __get_completion_signatures() // -> __completion_signatures_t<__decay_t<__data_of<_Sender>>, __child_of<_Sender>, _Env...> { - static_assert(sender_expr_for<_Sender, upon_error_t>); + static_assert(__sender_for<_Sender, upon_error_t>); // TODO: update this to use constant evaluation: return {}; }; diff --git a/include/stdexec/__detail/__upon_stopped.hpp b/include/stdexec/__detail/__upon_stopped.hpp index db333ac10..c781edd80 100644 --- a/include/stdexec/__detail/__upon_stopped.hpp +++ b/include/stdexec/__detail/__upon_stopped.hpp @@ -48,7 +48,7 @@ namespace STDEXEC static consteval auto __get_completion_signatures() // -> __completion_signatures_t<__decay_t<__data_of<_Sender>>, __child_of<_Sender>, _Env...> { - static_assert(sender_expr_for<_Sender, upon_stopped_t>); + static_assert(__sender_for<_Sender, upon_stopped_t>); // TODO: update this to use constant evaluation: return {}; }; diff --git a/include/stdexec/__detail/__when_all.hpp b/include/stdexec/__detail/__when_all.hpp index 9d5dfd41c..a2134a000 100644 --- a/include/stdexec/__detail/__when_all.hpp +++ b/include/stdexec/__detail/__when_all.hpp @@ -424,7 +424,7 @@ namespace STDEXEC template static consteval auto __get_completion_signatures() { - static_assert(sender_expr_for<_Self, when_all_t>); + static_assert(__sender_for<_Self, when_all_t>); if constexpr (__minvocable_q<__completions_t, _Self, _Env...>) { // TODO: update this to use constant evaluation: diff --git a/include/stdexec/__detail/__write_env.hpp b/include/stdexec/__detail/__write_env.hpp index 00d63c54f..941623547 100644 --- a/include/stdexec/__detail/__write_env.hpp +++ b/include/stdexec/__detail/__write_env.hpp @@ -46,7 +46,7 @@ namespace STDEXEC template static consteval auto __get_completion_signatures() { - static_assert(sender_expr_for<_Self, __write_env_t>); + static_assert(__sender_for<_Self, __write_env_t>); return STDEXEC::get_completion_signatures< __child_of<_Self>, __minvoke_q<__join_env_t, __decay_t<__data_of<_Self>> const &, _Env>...>(); diff --git a/test/exec/sequence/test_ignore_all_values.cpp b/test/exec/sequence/test_ignore_all_values.cpp index 110d7753a..8ff32ba66 100644 --- a/test/exec/sequence/test_ignore_all_values.cpp +++ b/test/exec/sequence/test_ignore_all_values.cpp @@ -30,7 +30,7 @@ namespace STATIC_REQUIRE(STDEXEC::sender_in>); STATIC_REQUIRE(std::same_as, STDEXEC::completion_signatures_of_t>>); - STATIC_REQUIRE(STDEXEC::sender_expr_for); + STATIC_REQUIRE(STDEXEC::__sender_for); CHECK(STDEXEC::sync_wait(sndr)); } diff --git a/test/exec/sequence/test_iterate.cpp b/test/exec/sequence/test_iterate.cpp index d3efc6f42..f34dae26c 100644 --- a/test/exec/sequence/test_iterate.cpp +++ b/test/exec/sequence/test_iterate.cpp @@ -111,7 +111,7 @@ namespace int sum = 0; auto iterate = exec::iterate(std::views::all(array)); STATIC_REQUIRE(exec::sequence_sender_in>); - STATIC_REQUIRE(STDEXEC::sender_expr_for); + STATIC_REQUIRE(STDEXEC::__sender_for); auto op = exec::subscribe(iterate, sum_receiver<>{.sum_ = sum}); STDEXEC::start(op); CHECK(sum == (42 + 43 + 44)); @@ -119,7 +119,7 @@ namespace struct my_domain { - template Sender, class _Env> + template Sender, class _Env> auto transform_sender(STDEXEC::start_t, Sender&& sender, _Env&&) const noexcept { auto range = STDEXEC::__get<1>(std::forward(sender)); @@ -133,7 +133,7 @@ namespace std::array array{42, 43, 44}; auto iterate = exec::iterate(std::views::all(array)); STATIC_REQUIRE(exec::sequence_sender_in>); - STATIC_REQUIRE(STDEXEC::sender_expr_for); + STATIC_REQUIRE(STDEXEC::__sender_for); auto env = STDEXEC::prop{STDEXEC::get_domain, my_domain{}}; using Env = decltype(env); int sum = 0; diff --git a/test/exec/sequence/test_merge.cpp b/test/exec/sequence/test_merge.cpp index 6259867b1..8792d7320 100644 --- a/test/exec/sequence/test_merge.cpp +++ b/test/exec/sequence/test_merge.cpp @@ -17,6 +17,7 @@ #include "exec/sequence/merge.hpp" +#include "exec/sender_for.hpp" #include "exec/sequence.hpp" #include "exec/sequence/empty_sequence.hpp" #include "exec/sequence/ignore_all_values.hpp" @@ -234,7 +235,7 @@ namespace struct my_domain { - template Sender, class Env> + template Sender, class Env> static auto transform_sender(STDEXEC::set_value_t, Sender&&, Env const &) { return ex::just(int{21}); diff --git a/test/exec/sequence/test_transform_each.cpp b/test/exec/sequence/test_transform_each.cpp index ca4a96439..4708bc077 100644 --- a/test/exec/sequence/test_transform_each.cpp +++ b/test/exec/sequence/test_transform_each.cpp @@ -17,6 +17,7 @@ #include "exec/sequence/transform_each.hpp" +#include "exec/sender_for.hpp" #include "exec/sequence/empty_sequence.hpp" #include "exec/sequence/ignore_all_values.hpp" #include "exec/sequence/iterate.hpp" @@ -95,7 +96,7 @@ namespace struct my_domain { - template Sender, class Env> + template Sender, class Env> static auto transform_sender(STDEXEC::set_value_t, Sender &&, Env const &) { return ex::just(int{42}); diff --git a/test/exec/test_fork_join.cpp b/test/exec/test_fork_join.cpp index b67a67ba3..762c98483 100644 --- a/test/exec/test_fork_join.cpp +++ b/test/exec/test_fork_join.cpp @@ -141,7 +141,7 @@ namespace struct customize_fork_join_domain : public STDEXEC::default_domain { - template Sndr, class Env> + template Sndr, class Env> constexpr auto transform_sender(STDEXEC::set_value_t, Sndr &&, Env const &) const noexcept { return STDEXEC::just(std::string("congrats on customizing fork_join_t")); diff --git a/test/exec/test_task.cpp b/test/exec/test_task.cpp index 6bd799109..5b3f1d229 100644 --- a/test/exec/test_task.cpp +++ b/test/exec/test_task.cpp @@ -19,6 +19,7 @@ #if !STDEXEC_NO_STDCPP_COROUTINES() # include +# include # include # include @@ -285,7 +286,7 @@ namespace struct test_domain { - template _Sender> + template _Sender> static constexpr auto transform_sender(STDEXEC::set_value_t, _Sender&&, auto&&...) noexcept { return ex::just("goodbye"s); diff --git a/test/stdexec/algos/adaptors/test_bulk.cpp b/test/stdexec/algos/adaptors/test_bulk.cpp index e8ef4d16c..58005c2a3 100644 --- a/test/stdexec/algos/adaptors/test_bulk.cpp +++ b/test/stdexec/algos/adaptors/test_bulk.cpp @@ -16,6 +16,7 @@ #include #include +#include #include #include #include @@ -1307,7 +1308,7 @@ namespace struct my_domain { - template Sender, class... Env> + template Sender, class... Env> static auto transform_sender(STDEXEC::set_value_t, Sender, Env const &...) { return ex::just(std::string{"hijacked"}); @@ -1327,7 +1328,7 @@ namespace struct my_domain2 { - template Sender, class... Env> + template Sender, class... Env> static auto transform_sender(STDEXEC::set_value_t, Sender, Env const &...) { return ex::just(std::string{"hijacked"}); diff --git a/test/stdexec/algos/adaptors/test_continues_on.cpp b/test/stdexec/algos/adaptors/test_continues_on.cpp index 4980aeaca..6708de664 100644 --- a/test/stdexec/algos/adaptors/test_continues_on.cpp +++ b/test/stdexec/algos/adaptors/test_continues_on.cpp @@ -15,6 +15,7 @@ */ #include +#include #include #include #include @@ -243,7 +244,7 @@ namespace struct continues_on_test_domain { - template Sender> + template Sender> static auto transform_sender(STDEXEC::set_value_t, Sender &&, auto const &...) { return ex::just(value_type{53}); @@ -263,7 +264,7 @@ namespace struct test_domain_A { - template Sender, class Env> + template Sender, class Env> auto transform_sender(STDEXEC::set_value_t, Sender &&, Env &&) const { return ex::just(std::string("hello")); @@ -272,7 +273,7 @@ namespace struct test_domain_B { - template Sender, class Env> + template Sender, class Env> auto transform_sender(STDEXEC::set_value_t, Sender &&, Env &&) const { return ex::just(std::string("goodbye")); diff --git a/test/stdexec/algos/adaptors/test_let_error.cpp b/test/stdexec/algos/adaptors/test_let_error.cpp index 00f615207..d5e8011e5 100644 --- a/test/stdexec/algos/adaptors/test_let_error.cpp +++ b/test/stdexec/algos/adaptors/test_let_error.cpp @@ -16,6 +16,7 @@ #include #include +#include #include #include #include @@ -349,7 +350,7 @@ namespace // Return a different sender when we invoke this custom defined let_error implementation struct let_error_test_domain { - template Sender> + template Sender> static auto transform_sender(STDEXEC::set_value_t, Sender&&, auto&&...) { return ex::just(std::string{"what error?"}); } diff --git a/test/stdexec/algos/adaptors/test_let_stopped.cpp b/test/stdexec/algos/adaptors/test_let_stopped.cpp index 8e87ab96e..2e5ac09a0 100644 --- a/test/stdexec/algos/adaptors/test_let_stopped.cpp +++ b/test/stdexec/algos/adaptors/test_let_stopped.cpp @@ -17,6 +17,7 @@ #include "stdexec/__detail/__sender_introspection.hpp" #include #include +#include #include #include #include @@ -217,7 +218,7 @@ namespace // Return a different sender when we invoke this custom defined let_stopped implementation struct let_stopped_test_domain { - template Sender> + template Sender> static auto transform_sender(STDEXEC::set_value_t, Sender&&, auto&&...) { return ex::just(std::string{"Don't stop me now"}); diff --git a/test/stdexec/algos/adaptors/test_let_value.cpp b/test/stdexec/algos/adaptors/test_let_value.cpp index 8e12e1791..5d2f99900 100644 --- a/test/stdexec/algos/adaptors/test_let_value.cpp +++ b/test/stdexec/algos/adaptors/test_let_value.cpp @@ -17,6 +17,7 @@ #include "stdexec/__detail/__let.hpp" #include #include +#include #include #include #include @@ -361,7 +362,7 @@ namespace // Return a different sender when we invoke this custom defined let_value implementation struct let_value_test_domain { - template Sender> + template Sender> static auto transform_sender(STDEXEC::set_value_t, Sender&&, auto&&...) { return ex::just(std::string{"hallo"}); diff --git a/test/stdexec/algos/adaptors/test_starts_on.cpp b/test/stdexec/algos/adaptors/test_starts_on.cpp index ef307cb75..0d68693ed 100644 --- a/test/stdexec/algos/adaptors/test_starts_on.cpp +++ b/test/stdexec/algos/adaptors/test_starts_on.cpp @@ -15,6 +15,7 @@ */ #include +#include #include #include #include @@ -208,7 +209,7 @@ namespace // Return a different sender when we invoke this custom defined starts_on implementation struct starts_on_test_domain { - template Sender> + template Sender> static auto transform_sender(STDEXEC::set_value_t, Sender&&, auto const &...) { return ex::just(std::string{"Hello, world!"}); diff --git a/test/stdexec/algos/adaptors/test_then.cpp b/test/stdexec/algos/adaptors/test_then.cpp index 5643a8b76..4292eb7ea 100644 --- a/test/stdexec/algos/adaptors/test_then.cpp +++ b/test/stdexec/algos/adaptors/test_then.cpp @@ -15,6 +15,7 @@ */ #include +#include #include #include #include @@ -205,7 +206,7 @@ namespace // Return a different sender when we invoke this custom defined then implementation struct then_test_domain { - template Sender, class... Env> + template Sender, class... Env> static auto transform_sender(STDEXEC::set_value_t, Sender &&, Env &&...) { return ex::just(std::string{"ciao"}); diff --git a/test/stdexec/algos/adaptors/test_transfer_when_all.cpp b/test/stdexec/algos/adaptors/test_transfer_when_all.cpp index fd1b56757..3742bcf4e 100644 --- a/test/stdexec/algos/adaptors/test_transfer_when_all.cpp +++ b/test/stdexec/algos/adaptors/test_transfer_when_all.cpp @@ -15,6 +15,7 @@ */ #include +#include #include #include #include @@ -127,7 +128,7 @@ namespace template struct basic_domain { - template Sender, class Env> + template Sender, class Env> auto transform_sender(STDEXEC::set_value_t, Sender &&, Env const &) const { return Fun(); @@ -148,7 +149,7 @@ namespace using scheduler = basic_inline_scheduler; auto snd = ex::transfer_when_all(scheduler(), ex::just(3), ex::just(0.1415)); - static_assert(ex::sender_expr_for); + static_assert(exec::sender_for); [[maybe_unused]] domain dom = ex::get_completion_domain(ex::get_env(snd)); } @@ -168,7 +169,7 @@ namespace using scheduler = basic_inline_scheduler; auto snd = ex::transfer_when_all_with_variant(scheduler(), ex::just(3), ex::just(0.1415)); - static_assert(ex::sender_expr_for); + static_assert(exec::sender_for); [[maybe_unused]] domain dom = ex::get_completion_domain(ex::get_env(snd)); } @@ -200,7 +201,7 @@ namespace using scheduler = basic_inline_scheduler; auto snd = ex::transfer_when_all_with_variant(scheduler(), ex::just(3), ex::just(0.1415)); - static_assert(ex::sender_expr_for); + static_assert(exec::sender_for); [[maybe_unused]] domain dom = ex::get_completion_domain(ex::get_env(snd)); } diff --git a/test/stdexec/algos/adaptors/test_when_all.cpp b/test/stdexec/algos/adaptors/test_when_all.cpp index cc1bbafe7..0316806e5 100644 --- a/test/stdexec/algos/adaptors/test_when_all.cpp +++ b/test/stdexec/algos/adaptors/test_when_all.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -339,7 +340,7 @@ namespace template struct basic_domain { - template Sender, class... Env> + template Sender, class... Env> requires(sizeof...(Env) == C) auto transform_sender(STDEXEC::set_value_t, Sender&&, Env&&...) const { @@ -362,7 +363,7 @@ namespace auto snd = ex::when_all(ex::just(3) | ex::continues_on(scheduler()), ex::just(0.1415) | ex::continues_on(scheduler())); - static_assert(ex::sender_expr_for); + static_assert(exec::sender_for); [[maybe_unused]] domain dom = ex::get_completion_domain(ex::get_env(snd), ex::env{}); } @@ -391,7 +392,7 @@ namespace auto snd = ex::when_all_with_variant(ex::just(3) | ex::continues_on(scheduler()), ex::just(0.1415) | ex::continues_on(scheduler())); - static_assert(ex::sender_expr_for); + static_assert(exec::sender_for); [[maybe_unused]] domain dom = ex::get_completion_domain(ex::get_env(snd), ex::env{}); } @@ -421,7 +422,7 @@ namespace auto snd = ex::when_all_with_variant(ex::just(3) | ex::continues_on(scheduler()), ex::just(0.1415) | ex::continues_on(scheduler())); - static_assert(ex::sender_expr_for); + static_assert(exec::sender_for); [[maybe_unused]] domain dom = ex::get_completion_domain(ex::get_env(snd), ex::env{}); } diff --git a/test/stdexec/algos/factories/test_transfer_just.cpp b/test/stdexec/algos/factories/test_transfer_just.cpp index eea278bf0..e02f573cb 100644 --- a/test/stdexec/algos/factories/test_transfer_just.cpp +++ b/test/stdexec/algos/factories/test_transfer_just.cpp @@ -15,6 +15,7 @@ */ #include +#include #include #include #include @@ -195,7 +196,7 @@ namespace // Modify the value when we invoke this custom defined transfer_just implementation struct transfer_just_test_domain { - template Sender> + template Sender> static auto transform_sender(STDEXEC::set_value_t, Sender&& sndr, auto&&...) { auto&& [tag, data] = sndr; diff --git a/test/stdexec/schedulers/test_task_scheduler.cpp b/test/stdexec/schedulers/test_task_scheduler.cpp index 56b276566..da856be87 100644 --- a/test/stdexec/schedulers/test_task_scheduler.cpp +++ b/test/stdexec/schedulers/test_task_scheduler.cpp @@ -16,6 +16,7 @@ */ #include +#include #include #include @@ -64,7 +65,7 @@ namespace struct test_domain { - template Sndr, class Env> + template Sndr, class Env> auto transform_sender(ex::set_value_t, Sndr sndr, Env const &) const { return ex::then(opaque_sender{std::move(sndr)}, []() noexcept { g_called = true; }); From 1ed9004050387451e14face4699c37185a208035 Mon Sep 17 00:00:00 2001 From: Eric Niebler Date: Mon, 2 Mar 2026 17:53:53 -0800 Subject: [PATCH 2/4] fix nvexec --- include/nvexec/stream/common.cuh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/nvexec/stream/common.cuh b/include/nvexec/stream/common.cuh index 5933da9c7..f6685c4f6 100644 --- a/include/nvexec/stream/common.cuh +++ b/include/nvexec/stream/common.cuh @@ -97,7 +97,7 @@ namespace nv::execution // algorithms use the current scheduler's domain to transform senders before starting them. struct stream_domain : STDEXEC::default_domain { - template , class Env> + template <::exec::sender_for Sender, class Tag = STDEXEC::tag_of_t, class Env> requires STDEXEC::__applicable<_strm::transform_sender_for, Sender, Env const &> static auto transform_sender(STDEXEC::set_value_t, Sender&& sndr, Env const & env) { From 693dae0a78bd858046eb7c6049c191c00c908a8d Mon Sep 17 00:00:00 2001 From: Eric Niebler Date: Mon, 2 Mar 2026 18:02:31 -0800 Subject: [PATCH 3/4] roll back bad change to libdispatch_queue --- include/exec/libdispatch_queue.hpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/include/exec/libdispatch_queue.hpp b/include/exec/libdispatch_queue.hpp index 5a0625822..3a7f79d7b 100644 --- a/include/exec/libdispatch_queue.hpp +++ b/include/exec/libdispatch_queue.hpp @@ -28,9 +28,6 @@ # endif # include "../stdexec/execution.hpp" - -# include "sender_for.hpp" - # include namespace experimental::execution @@ -94,10 +91,9 @@ namespace experimental::execution struct domain { // transform the generic bulk sender into a parallel libdispatch bulk sender - template + template Sender, class Env> auto transform_sender(STDEXEC::set_value_t, Sender &&sndr, Env const &env) const noexcept { - static_assert(sender_for); if constexpr (STDEXEC::__completes_on) { auto sched = From be7a3462641e852601a307e63f0d0eae60151dbb Mon Sep 17 00:00:00 2001 From: Eric Niebler Date: Mon, 2 Mar 2026 19:39:24 -0800 Subject: [PATCH 4/4] formatting --- include/nvexec/stream/common.cuh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/nvexec/stream/common.cuh b/include/nvexec/stream/common.cuh index f6685c4f6..eb3b04425 100644 --- a/include/nvexec/stream/common.cuh +++ b/include/nvexec/stream/common.cuh @@ -28,7 +28,7 @@ #include #include -#include "../../exec/sender_for.hpp" // IWYU pragma: keep for sender_for +#include "../../exec/sender_for.hpp" // IWYU pragma: keep for sender_for #include "../detail/config.cuh" #include "../detail/cuda_atomic.cuh" // IWYU pragma: keep #include "../detail/queue.cuh"