From e3f1ee787f78f2bc8c8ca21003f92df4f9aa6145 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dietmar=20K=C3=BChl?= Date: Sun, 18 Jan 2026 19:53:17 +0100 Subject: [PATCH 1/5] try to work around a clang issue --- include/beman/execution/detail/affine_on.hpp | 9 +++++++-- include/beman/execution/detail/prop.hpp | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/include/beman/execution/detail/affine_on.hpp b/include/beman/execution/detail/affine_on.hpp index 3f3a6ed4..25092070 100644 --- a/include/beman/execution/detail/affine_on.hpp +++ b/include/beman/execution/detail/affine_on.hpp @@ -28,6 +28,8 @@ #include #include +#include + // ---------------------------------------------------------------------------- namespace beman::execution::detail { @@ -90,7 +92,8 @@ struct affine_on_t : ::beman::execution::sender_adaptor_closure { ::beman::execution::schedule(::beman::execution::get_scheduler(env)), ::beman::execution::detail::join_env( ::beman::execution::env{::beman::execution::prop{::beman::execution::get_stop_token, - ::beman::execution::never_stop_token{}}}, + ::beman::execution::never_stop_token{}, + {}}}, env)) } -> ::std::same_as<::beman::execution::completion_signatures<::beman::execution::set_value_t()>>; } @@ -98,7 +101,7 @@ struct affine_on_t : ::beman::execution::sender_adaptor_closure { [[maybe_unused]] auto& [tag, data, child] = sender; using child_tag_t = ::beman::execution::tag_of_t<::std::remove_cvref_t>; -#if 0 +#if 1 if constexpr (requires(const child_tag_t& t) { { t.affine_on(::beman::execution::detail::forward_like(child), env) @@ -135,4 +138,6 @@ inline constexpr affine_on_t affine_on{}; // ---------------------------------------------------------------------------- +#include + #endif diff --git a/include/beman/execution/detail/prop.hpp b/include/beman/execution/detail/prop.hpp index 73b95e03..56d23476 100644 --- a/include/beman/execution/detail/prop.hpp +++ b/include/beman/execution/detail/prop.hpp @@ -20,7 +20,7 @@ template struct prop; template -prop(Query, Value) -> prop>; +prop(Query, Value, ::beman::execution::detail::non_assignable = {}) -> prop>; } // namespace beman::execution template From 4e5e6acd703ba9aaa3139dcf3b954e033916f05c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dietmar=20K=C3=BChl?= Date: Sun, 18 Jan 2026 20:06:55 +0100 Subject: [PATCH 2/5] another attempt at working around a clang bug --- include/beman/execution/detail/affine_on.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/beman/execution/detail/affine_on.hpp b/include/beman/execution/detail/affine_on.hpp index 25092070..79809524 100644 --- a/include/beman/execution/detail/affine_on.hpp +++ b/include/beman/execution/detail/affine_on.hpp @@ -111,7 +111,7 @@ struct affine_on_t : ::beman::execution::sender_adaptor_closure { if constexpr (::beman::execution::detail::nested_sender_has_affine_on) #endif { - return child_tag_t{}.affine_on(::beman::execution::detail::forward_like(child), env); + return child_tag_t().affine_on(::beman::execution::detail::forward_like(child), env); } else { return ::beman::execution::write_env( ::beman::execution::schedule_from( From 5cb179e2aa87ccdb212e6682725ea9a430ca6acd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dietmar=20K=C3=BChl?= Date: Sun, 18 Jan 2026 20:16:18 +0100 Subject: [PATCH 3/5] another attempt working around a clang problem --- include/beman/execution/detail/affine_on.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/beman/execution/detail/affine_on.hpp b/include/beman/execution/detail/affine_on.hpp index 79809524..23e33086 100644 --- a/include/beman/execution/detail/affine_on.hpp +++ b/include/beman/execution/detail/affine_on.hpp @@ -111,7 +111,8 @@ struct affine_on_t : ::beman::execution::sender_adaptor_closure { if constexpr (::beman::execution::detail::nested_sender_has_affine_on) #endif { - return child_tag_t().affine_on(::beman::execution::detail::forward_like(child), env); + constexpr child_tag_t t{}; + return t.affine_on(::beman::execution::detail::forward_like(child), env); } else { return ::beman::execution::write_env( ::beman::execution::schedule_from( From f28950b9575bce817950fc76c2166fc7e70c6adc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dietmar=20K=C3=BChl?= Date: Sun, 18 Jan 2026 21:19:30 +0100 Subject: [PATCH 4/5] another attempt at working around a clang problem --- include/beman/execution/detail/affine_on.hpp | 35 ++++++++++++++------ 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/include/beman/execution/detail/affine_on.hpp b/include/beman/execution/detail/affine_on.hpp index 23e33086..d92ff949 100644 --- a/include/beman/execution/detail/affine_on.hpp +++ b/include/beman/execution/detail/affine_on.hpp @@ -65,6 +65,21 @@ struct affine_on_t : ::beman::execution::sender_adaptor_closure { */ auto operator()() const { return ::beman::execution::detail::sender_adaptor{*this}; } + template + struct ao_env { + Ev ev_; + auto query(::beman::execution::get_stop_token_t const&) const noexcept -> + ::beman::execution::never_stop_token { + return ::beman::execution::never_stop_token(); + } + template + auto query(Q const& q) const noexcept -> decltype(q(this->ev_)) { + return q(this->ev_); + } + }; + template + ao_env(Ev const&)->ao_env; + /** * @brief affine_on is implemented by transforming it into a use of schedule_from. * @@ -97,14 +112,14 @@ struct affine_on_t : ::beman::execution::sender_adaptor_closure { env)) } -> ::std::same_as<::beman::execution::completion_signatures<::beman::execution::set_value_t()>>; } - static auto transform_sender(Sender&& sender, const Env& env) { + static auto transform_sender(Sender&& sender, const Env& ev) { [[maybe_unused]] auto& [tag, data, child] = sender; using child_tag_t = ::beman::execution::tag_of_t<::std::remove_cvref_t>; -#if 1 +#if 0 if constexpr (requires(const child_tag_t& t) { { - t.affine_on(::beman::execution::detail::forward_like(child), env) + t.affine_on(::beman::execution::detail::forward_like(child), ev) } -> ::beman::execution::sender; }) #else @@ -112,16 +127,14 @@ struct affine_on_t : ::beman::execution::sender_adaptor_closure { #endif { constexpr child_tag_t t{}; - return t.affine_on(::beman::execution::detail::forward_like(child), env); - } else { + return t.affine_on(::beman::execution::detail::forward_like(child), ev); + } else + { return ::beman::execution::write_env( ::beman::execution::schedule_from( - ::beman::execution::get_scheduler(env), - ::beman::execution::write_env(::beman::execution::detail::forward_like(child), env)), - ::beman::execution::detail::join_env( - ::beman::execution::env{::beman::execution::prop{::beman::execution::get_stop_token, - ::beman::execution::never_stop_token{}}}, - env)); + ::beman::execution::get_scheduler(ev), + ::beman::execution::write_env(::beman::execution::detail::forward_like(child), ev)), + ao_env(ev)); } } }; From ca4a70e607657223b3b21f5f9e0a8f775eed7bfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dietmar=20K=C3=BChl?= Date: Sun, 18 Jan 2026 23:15:35 +0000 Subject: [PATCH 5/5] clang-format --- include/beman/execution/detail/affine_on.hpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/include/beman/execution/detail/affine_on.hpp b/include/beman/execution/detail/affine_on.hpp index d92ff949..35a6288e 100644 --- a/include/beman/execution/detail/affine_on.hpp +++ b/include/beman/execution/detail/affine_on.hpp @@ -67,18 +67,18 @@ struct affine_on_t : ::beman::execution::sender_adaptor_closure { template struct ao_env { - Ev ev_; - auto query(::beman::execution::get_stop_token_t const&) const noexcept -> - ::beman::execution::never_stop_token { + Ev ev_; + auto query(const ::beman::execution::get_stop_token_t&) const noexcept + -> ::beman::execution::never_stop_token { return ::beman::execution::never_stop_token(); } template - auto query(Q const& q) const noexcept -> decltype(q(this->ev_)) { + auto query(const Q& q) const noexcept -> decltype(q(this->ev_)) { return q(this->ev_); } }; template - ao_env(Ev const&)->ao_env; + ao_env(const Ev&) -> ao_env; /** * @brief affine_on is implemented by transforming it into a use of schedule_from. @@ -106,9 +106,8 @@ struct affine_on_t : ::beman::execution::sender_adaptor_closure { ::beman::execution::get_completion_signatures( ::beman::execution::schedule(::beman::execution::get_scheduler(env)), ::beman::execution::detail::join_env( - ::beman::execution::env{::beman::execution::prop{::beman::execution::get_stop_token, - ::beman::execution::never_stop_token{}, - {}}}, + ::beman::execution::env{::beman::execution::prop{ + ::beman::execution::get_stop_token, ::beman::execution::never_stop_token{}, {}}}, env)) } -> ::std::same_as<::beman::execution::completion_signatures<::beman::execution::set_value_t()>>; } @@ -128,8 +127,7 @@ struct affine_on_t : ::beman::execution::sender_adaptor_closure { { constexpr child_tag_t t{}; return t.affine_on(::beman::execution::detail::forward_like(child), ev); - } else - { + } else { return ::beman::execution::write_env( ::beman::execution::schedule_from( ::beman::execution::get_scheduler(ev),