13 template<
typename F,
typename G>
14 class ComposeFunction :
public pipeline::EnablePipeline {
16 template<
typename Fn,
typename Gn>
17 constexpr explicit ComposeFunction(Fn&& f, Gn&& g) : m_f(util::forward<Fn>(f)), m_g(util::forward<Gn>(g)) {}
19 constexpr ComposeFunction(ComposeFunction
const&) =
default;
20 constexpr ComposeFunction(ComposeFunction&&) =
default;
22 constexpr auto operator=(ComposeFunction
const&) -> ComposeFunction& =
delete;
23 constexpr auto operator=(ComposeFunction&&) -> ComposeFunction& =
delete;
25 template<
typename... Args>
26 requires(concepts::Invocable<G&, Args...> && concepts::Invocable<F&,
meta::InvokeResult<G&, Args...>>)
27 constexpr auto operator()(Args&&... args) & ->
decltype(
auto) {
31 template<
typename... Args>
32 requires(concepts::Invocable<G
const&, Args...> &&
34 constexpr auto operator()(Args&&... args)
const& ->
decltype(
auto) {
38 template<
typename... Args>
39 requires(concepts::Invocable<G &&, Args...> && concepts::Invocable<F &&,
meta::InvokeResult<G &&, Args...>>)
40 constexpr auto operator()(Args&&... args) && ->
decltype(
auto) {
44 template<
typename... Args>
45 requires(concepts::Invocable<G
const &&, Args...> &&
47 constexpr auto operator()(Args&&... args)
const&& ->
decltype(
auto) {
58requires(concepts::ConstructibleFrom<meta::Decay<F>, F>)
63template<
typename F,
typename G,
typename... Fs>
66constexpr auto
compose(F&& f, G&& g, Fs&&... rest) {
69 util::forward<Fs>(rest)...);
Definition operations.h:11
constexpr auto invoke
Definition invoke.h:100
constexpr auto compose(F &&f)
Definition compose.h:59
constexpr auto piped(F &&function)
Definition piped.h:56
Definition any_storable.h:9