11 #ifndef TLX_META_FOLD_RIGHT_HEADER 12 #define TLX_META_FOLD_RIGHT_HEADER 26 namespace meta_detail {
29 template <
typename Reduce,
typename Initial,
typename Arg>
31 return std::forward<Reduce>(r)(
32 std::forward<Arg>(arg), std::forward<Initial>(init));
36 template <
typename Reduce,
typename Initial,
typename Arg,
typename... MoreArgs>
38 Arg&& arg, MoreArgs&& ... rest) {
39 return std::forward<Reduce>(r)(
40 std::forward<Arg>(arg),
42 std::forward<MoreArgs>(rest) ...));
49 template <
typename Reduce,
typename Initial,
typename... Args>
50 auto fold_right(Reduce&& r, Initial&& init, Args&& ... args) {
52 std::forward<Reduce>(r), std::forward<Initial>(init),
53 std::forward<Args>(args) ...);
60 #endif // !TLX_META_FOLD_RIGHT_HEADER