Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #ifndef BOOST_METAPARSE_V1_IMPL_ONE_OF_FWD_OP_HPP
0002 #define BOOST_METAPARSE_V1_IMPL_ONE_OF_FWD_OP_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/is_error.hpp>
0010 #include <boost/metaparse/v1/cpp98/impl/later_result.hpp>
0011 
0012 #include <boost/mpl/eval_if.hpp>
0013 
0014 namespace boost
0015 {
0016   namespace metaparse
0017   {
0018     namespace v1
0019     {
0020       namespace impl
0021       {
0022         template <class S, class Pos>
0023         struct one_of_fwd_op
0024         {
0025           typedef one_of_fwd_op type;
0026 
0027           template <class State, class P>
0028           struct apply :
0029             boost::mpl::eval_if<
0030               typename is_error<State>::type,
0031               boost::mpl::eval_if<
0032                 typename is_error<typename P::template apply<S, Pos> >::type,
0033                 later_result<State, typename P::template apply<S, Pos> >,
0034                 typename P::template apply<S, Pos>
0035               >,
0036               State
0037             >
0038           {};
0039         };
0040       }
0041     }
0042   }
0043 }
0044 
0045 #endif
0046