Skip to content

Commit 51b8a0c

Browse files
committed
defined stop_when_t's operator out of line
1 parent 49789da commit 51b8a0c

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

include/beman/execution/detail/stop_when.hpp

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,7 @@ inline constexpr struct stop_when_t {
3232
struct sender;
3333

3434
template <::beman::execution::sender Sndr, ::beman::execution::stoppable_token Tok>
35-
auto operator()(Sndr&& sndr, Tok&& tok) const noexcept {
36-
if constexpr (::beman::execution::unstoppable_token<Tok>) {
37-
return ::std::forward<Sndr>(sndr);
38-
} else {
39-
return sender<Sndr, Tok>(*this, ::std::forward<Tok>(tok), ::std::forward<Sndr>(sndr));
40-
}
41-
}
35+
auto operator()(Sndr&& sndr, Tok&& tok) const noexcept;
4236
} stop_when{};
4337
} // namespace beman::execution::detail
4438

@@ -128,6 +122,15 @@ struct beman::execution::detail::stop_when_t::sender {
128122
}
129123
};
130124

125+
template <::beman::execution::sender Sndr, ::beman::execution::stoppable_token Tok>
126+
inline auto beman::execution::detail::stop_when_t::operator()(Sndr&& sndr, Tok&& tok) const noexcept {
127+
if constexpr (::beman::execution::unstoppable_token<Tok>) {
128+
return ::std::forward<Sndr>(sndr);
129+
} else {
130+
return sender<Sndr, Tok>(*this, ::std::forward<Tok>(tok), ::std::forward<Sndr>(sndr));
131+
}
132+
}
133+
131134
// ----------------------------------------------------------------------------
132135

133136
#endif

0 commit comments

Comments
 (0)