35 #if ABL_REDUCE_TAIL_RECURSIVE
37 # define ABL_REDUCE_NESTED_NON_EMPTY_NON_VARIADIC_IMPL \
38 ::atria::xform::detail::reduce_nested_non_empty_tail_recursive
40 #elif ABL_REDUCE_WITH_ACCUMULATE
41 # include <atria/xform/detail/reduce_nested_non_empty_tail_accumulate.hpp>
42 # define ABL_REDUCE_NESTED_NON_EMPTY_NON_VARIADIC_IMPL \
43 ::atria::xform::detail::reduce_nested_non_empty_accumulate
45 #elif ABL_REDUCE_ALWAYS_VARIADIC
47 # define ABL_REDUCE_NESTED_NON_EMPTY_NON_VARIADIC_IMPL \
48 ::atria::xform::detail::reduce_nested_non_empty_variadic
52 # define ABL_REDUCE_NESTED_NON_EMPTY_NON_VARIADIC_IMPL \
53 ::atria::xform::detail::reduce_nested_non_empty_non_variadic
60 template <
typename ReducingFnT,
62 auto reduce_nested_non_empty(ReducingFnT&& step,
65 reduce_nested_non_empty_nullary(
66 std::forward<ReducingFnT>(step),
67 std::forward<StateT>(state)))
69 template <typename ReducingFnT,
72 auto reduce_nested_non_empty(ReducingFnT&& step,
76 ABL_REDUCE_NESTED_NON_EMPTY_NON_VARIADIC_IMPL(
77 std::forward<ReducingFnT>(step),
78 std::forward<StateT>(state),
81 template <typename ReducingFnT,
84 typename ...InputRangeTs>
85 auto reduce_nested_non_empty(ReducingFnT&& step,
88 InputRangeTs&& ...ranges)
90 reduce_nested_non_empty_variadic(
91 std::forward<ReducingFnT>(step),
92 std::forward<StateT>(state),
93 std::forward<InputRangeT>(range),
94 std::forward<InputRangeTs>(ranges)...))
#define ABL_DECLTYPE_RETURN(body_expr)
Utility for defining generic functions with a deduced return type, that are composed of a single expr...
C++ amazing templates and reusable implementations awesomeness.