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