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_HPP
0002 #define BOOST_METAPARSE_V1_IMPL_ONE_OF_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/error/none_of_the_expected_cases_found.hpp>
0010 #include <boost/metaparse/v1/fail.hpp>
0011 
0012 #include <boost/metaparse/v1/cpp98/impl/one_of_fwd_op.hpp>
0013 
0014 #include <boost/mpl/fold.hpp>
0015 
0016 namespace boost
0017 {
0018   namespace metaparse
0019   {
0020     namespace v1
0021     {
0022       namespace impl
0023       {
0024         template <class Parsers>
0025         struct one_of
0026         {
0027           typedef one_of type;
0028 
0029           template <class S, class Pos>
0030           struct apply :
0031             boost::mpl::fold<
0032               Parsers,
0033               fail<error::none_of_the_expected_cases_found>::apply<S, Pos>,
0034               one_of_fwd_op<S, Pos>
0035             >::type
0036           {};
0037         };
0038       }
0039     }
0040   }
0041 }
0042 
0043 #endif
0044