File indexing completed on 2025-01-18 09:40:49
0001 #ifndef BOOST_METAPARSE_V1_FOLDL_START_WITH_PARSER_HPP
0002 #define BOOST_METAPARSE_V1_FOLDL_START_WITH_PARSER_HPP
0003
0004
0005
0006
0007
0008
0009 #include <boost/metaparse/v1/foldl.hpp>
0010
0011 namespace boost
0012 {
0013 namespace metaparse
0014 {
0015 namespace v1
0016 {
0017 template <class P, class StateP, class ForwardOp>
0018 class foldl_start_with_parser
0019 {
0020 private:
0021 template <class Res>
0022 struct apply_unchecked :
0023 foldl<P, typename get_result<Res>::type, ForwardOp>::template apply<
0024 typename get_remaining<Res>::type,
0025 typename get_position<Res>::type
0026 >
0027 {};
0028 public:
0029 typedef foldl_start_with_parser type;
0030
0031 template <class S, class Pos>
0032 struct apply :
0033 boost::mpl::eval_if<
0034 typename is_error<typename StateP::template apply<S, Pos> >::type,
0035 typename StateP::template apply<S, Pos>,
0036 apply_unchecked<typename StateP::template apply<S, Pos> >
0037 >
0038 {};
0039 };
0040 }
0041 }
0042 }
0043
0044 #endif
0045