File indexing completed on 2025-01-18 09:38:05
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef BOOST_HANA_REVERSE_FOLD_HPP
0011 #define BOOST_HANA_REVERSE_FOLD_HPP
0012
0013 #include <boost/hana/fwd/reverse_fold.hpp>
0014
0015 #include <boost/hana/config.hpp>
0016 #include <boost/hana/fold_right.hpp>
0017 #include <boost/hana/functional/flip.hpp>
0018
0019
0020 namespace boost { namespace hana {
0021
0022 template <typename Xs, typename S, typename F>
0023 constexpr decltype(auto) reverse_fold_t::operator()(Xs&& xs, S&& s, F&& f) const {
0024 return hana::fold_right(static_cast<Xs&&>(xs),
0025 static_cast<S&&>(s),
0026 hana::flip(static_cast<F&&>(f)));
0027 }
0028
0029 template <typename Xs, typename F>
0030 constexpr decltype(auto) reverse_fold_t::operator()(Xs&& xs, F&& f) const {
0031 return hana::fold_right(static_cast<Xs&&>(xs),
0032 hana::flip(static_cast<F&&>(f)));
0033 }
0034
0035 }}
0036
0037 #endif