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
0005
0006
0007
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