File indexing completed on 2025-01-18 09:50:27
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef BOOST_PROTO_FUNCTIONAL_FUSION_REVERSE_HPP_EAN_11_27_2010
0010 #define BOOST_PROTO_FUNCTIONAL_FUSION_REVERSE_HPP_EAN_11_27_2010
0011
0012 #include <boost/fusion/include/reverse.hpp>
0013 #include <boost/proto/proto_fwd.hpp>
0014
0015 namespace boost { namespace proto { namespace functional
0016 {
0017
0018
0019
0020
0021
0022
0023
0024
0025 struct reverse
0026 {
0027 BOOST_PROTO_CALLABLE()
0028
0029 template<typename Sig>
0030 struct result;
0031
0032 template<typename This, typename Seq>
0033 struct result<This(Seq)>
0034 : result<This(Seq const &)>
0035 {};
0036
0037 template<typename This, typename Seq>
0038 struct result<This(Seq &)>
0039 : fusion::result_of::reverse<Seq>
0040 {};
0041
0042 template<typename Seq>
0043 typename fusion::result_of::reverse<Seq>::type
0044 operator ()(Seq &seq) const
0045 {
0046
0047 typedef typename fusion::result_of::reverse<Seq>::type result_type;
0048 return result_type(seq);
0049 }
0050
0051 template<typename Seq>
0052 typename fusion::result_of::reverse<Seq const>::type
0053 operator ()(Seq const &seq) const
0054 {
0055 return fusion::reverse(seq);
0056 }
0057 };
0058 }}}
0059
0060 #endif