diff --git a/include/beman/execution/detail/stop_when.hpp b/include/beman/execution/detail/stop_when.hpp index cd3ef5b8..371b7ec5 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