Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:40:48

0001 #ifndef BOOST_METAPARSE_V1_CPP98_IMPL_SKIP_SEQ_HPP
0002 #define BOOST_METAPARSE_V1_CPP98_IMPL_SKIP_SEQ_HPP
0003 
0004 // Copyright Abel Sinkovics (abel@sinkovics.hu)  2013.
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/is_error.hpp>
0010 #include <boost/metaparse/v1/accept.hpp>
0011 #include <boost/metaparse/v1/get_remaining.hpp>
0012 #include <boost/metaparse/v1/get_position.hpp>
0013 #include <boost/metaparse/v1/get_result.hpp>
0014 
0015 namespace boost
0016 {
0017   namespace metaparse
0018   {
0019     namespace v1
0020     {
0021       namespace impl
0022       {
0023         struct skip_seq
0024         {
0025         private:
0026           template <class ParsingResult, class NewResultValue>
0027           struct change_result :
0028             accept<
0029               NewResultValue,
0030               typename get_remaining<ParsingResult>::type,
0031               typename get_position<ParsingResult>::type
0032             >
0033           {};
0034         
0035           template <class Result, class P>
0036           struct apply_unchecked :
0037             boost::mpl::eval_if<
0038               typename is_error<
0039                 typename P::template apply<
0040                   typename get_remaining<Result>::type,
0041                   typename get_position<Result>::type
0042                 >
0043               >::type,
0044               typename P::template apply<
0045                 typename get_remaining<Result>::type,
0046                 typename get_position<Result>::type
0047               >,
0048               change_result<
0049                 typename P::template apply<
0050                   typename get_remaining<Result>::type,
0051                   typename get_position<Result>::type
0052                 >,
0053                 typename get_result<Result>::type
0054               >
0055             >
0056           {};
0057           
0058         public:
0059           template <class Result, class P>
0060           struct apply :
0061             boost::mpl::eval_if<
0062               is_error<Result>,
0063               Result,
0064               apply_unchecked<Result, P>
0065             >
0066           {};
0067         };
0068       }
0069     }
0070   }
0071 }
0072 
0073 #endif
0074