From 51b8a0ca8d3fc459a69b6caada73cbf0acb636f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dietmar=20K=C3=BChl?= Date: Tue, 1 Jul 2025 00:37:14 +0100 Subject: [PATCH 1/2] defined stop_when_t's operator out of line --- include/beman/execution/detail/stop_when.hpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/include/beman/execution/detail/stop_when.hpp b/include/beman/execution/detail/stop_when.hpp index cd3ef5b8..d0ae8e33 100644 --- a/include/beman/execution/detail/stop_when.hpp +++ b/include/beman/execution/detail/stop_when.hpp @@ -32,13 +32,7 @@ inline constexpr struct stop_when_t { struct sender; template <::beman::execution::sender Sndr, ::beman::execution::stoppable_token Tok> - auto operator()(Sndr&& sndr, Tok&& tok) const noexcept { - if constexpr (::beman::execution::unstoppable_token) { - return ::std::forward(sndr); - } else { - return sender(*this, ::std::forward(tok), ::std::forward(sndr)); - } - } + auto operator()(Sndr&& sndr, Tok&& tok) const noexcept; } stop_when{}; } // namespace beman::execution::detail @@ -128,6 +122,15 @@ struct beman::execution::detail::stop_when_t::sender { } }; + template <::beman::execution::sender Sndr, ::beman::execution::stoppable_token Tok> + inline auto beman::execution::detail::stop_when_t::operator()(Sndr&& sndr, Tok&& tok) const noexcept { + if constexpr (::beman::execution::unstoppable_token) { + return ::std::forward(sndr); + } else { + return sender(*this, ::std::forward(tok), ::std::forward(sndr)); + } + } + // ---------------------------------------------------------------------------- #endif From 52357d59b1e8528f61f62f5b4c49e37af3cb3530 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dietmar=20K=C3=BChl?= Date: Tue, 1 Jul 2025 00:38:41 +0100 Subject: [PATCH 2/2] clang format --- include/beman/execution/detail/stop_when.hpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/beman/execution/detail/stop_when.hpp b/include/beman/execution/detail/stop_when.hpp index d0ae8e33..371b7ec5 100644 --- a/include/beman/execution/detail/stop_when.hpp +++ b/include/beman/execution/detail/stop_when.hpp @@ -122,14 +122,14 @@ struct beman::execution::detail::stop_when_t::sender { } }; - template <::beman::execution::sender Sndr, ::beman::execution::stoppable_token Tok> - inline auto beman::execution::detail::stop_when_t::operator()(Sndr&& sndr, Tok&& tok) const noexcept { - if constexpr (::beman::execution::unstoppable_token) { - return ::std::forward(sndr); - } else { - return sender(*this, ::std::forward(tok), ::std::forward(sndr)); - } +template <::beman::execution::sender Sndr, ::beman::execution::stoppable_token Tok> +inline auto beman::execution::detail::stop_when_t::operator()(Sndr&& sndr, Tok&& tok) const noexcept { + if constexpr (::beman::execution::unstoppable_token) { + return ::std::forward(sndr); + } else { + return sender(*this, ::std::forward(tok), ::std::forward(sndr)); } +} // ----------------------------------------------------------------------------