39 template <
class F,
class G>
46 auto operator() (T&& ...xs)
48 estd::invoke(f, estd::invoke(g, std::forward<T>(xs)...)))
51 template <
typename ...Fns>
54 template <
typename... Ts>
55 using get_composed_t =
typename get_composed<Ts...>::type;
58 struct get_composed<F> {
62 template <
typename F,
typename... Fs>
63 struct get_composed<F, Fs...> {
64 using type = composed<F, get_composed_t<Fs...> >;
82 return std::forward<F>(f);
85 template <
typename Fn,
typename ...Fns>
86 auto comp(Fn&& f, Fns&& ...fns)
89 using result_t = detail::get_composed_t<
91 return result_t { std::forward<Fn>(f),
comp(std::forward<Fns>(fns)...)};
#define ABL_DECLTYPE_RETURN(body_expr)
Utility for defining generic functions with a deduced return type, that are composed of a single expr...
typename std::decay< T >::type decay_t
Similar to C++14 std::decay_t.
auto comp(F &&f) -> F &&
Right-to left function composition.
C++ amazing templates and reusable implementations awesomeness.