Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-12-15 09:56:15

0001 #ifndef BOOST_METAPARSE_V1_FOLDL_REJECT_INCOMPLETE_START_WITH_PARSER_HPP
0002 #define BOOST_METAPARSE_V1_FOLDL_REJECT_INCOMPLETE_START_WITH_PARSER_HPP
0003 
0004 // Copyright Abel Sinkovics (abel@sinkovics.hu)  2015.
0005 // Distributed under the Boost Software License, Version 1.0.
0006 //    (See accompanying file LICENSE_1_0.txt or copy at
0007 //          http://www.boost.org/LICENSE_1_0.txt)
0008 
0009 #include <boost/metaparse/v1/foldl_reject_incomplete.hpp>
0010 #include <boost/metaparse/v1/get_remaining.hpp>
0011 #include <boost/metaparse/v1/get_position.hpp>
0012 #include <boost/metaparse/v1/get_result.hpp>
0013 #include <boost/metaparse/v1/is_error.hpp>
0014 
0015 #include <boost/mpl/eval_if.hpp>
0016 
0017 namespace boost
0018 {
0019   namespace metaparse
0020   {
0021     namespace v1
0022     {
0023       template <class P, class StateP, class ForwardOp>
0024       class foldl_reject_incomplete_start_with_parser
0025       {
0026       private:
0027         template <class Res>
0028         struct apply_unchecked :
0029           foldl_reject_incomplete<
0030             P,
0031             typename get_result<Res>::type,
0032             ForwardOp
0033           >::template apply<
0034             typename get_remaining<Res>::type,
0035             typename get_position<Res>::type
0036           >
0037         {};
0038       public:
0039         typedef foldl_reject_incomplete_start_with_parser type;
0040 
0041         template <class S, class Pos>
0042         struct apply :
0043           boost::mpl::eval_if<
0044             typename is_error<typename StateP::template apply<S, Pos> >::type,
0045             typename StateP::template apply<S, Pos>,
0046             apply_unchecked<typename StateP::template apply<S, Pos> >
0047           >
0048         {};
0049       };
0050     }
0051   }
0052 }
0053 
0054 #endif
0055