]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/metaparse/v1/impl/one_of.hpp
Add patch for failing prerm scripts
[ceph.git] / ceph / src / boost / boost / metaparse / v1 / impl / one_of.hpp
1 #ifndef BOOST_METAPARSE_V1_IMPL_ONE_OF_HPP
2 #define BOOST_METAPARSE_V1_IMPL_ONE_OF_HPP
3
4 // Copyright Abel Sinkovics (abel@sinkovics.hu) 2013.
5 // Distributed under the Boost Software License, Version 1.0.
6 // (See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt)
8
9 #include <boost/metaparse/v1/error/none_of_the_expected_cases_found.hpp>
10 #include <boost/metaparse/v1/fail.hpp>
11
12 #include <boost/metaparse/v1/impl/one_of_fwd_op.hpp>
13
14 #include <boost/mpl/fold.hpp>
15
16 namespace boost
17 {
18 namespace metaparse
19 {
20 namespace v1
21 {
22 namespace impl
23 {
24 template <class Parsers>
25 struct one_of
26 {
27 typedef one_of type;
28
29 template <class S, class Pos>
30 struct apply :
31 boost::mpl::fold<
32 Parsers,
33 fail<error::none_of_the_expected_cases_found>::apply<S, Pos>,
34 one_of_fwd_op<S, Pos>
35 >::type
36 {};
37 };
38 }
39 }
40 }
41 }
42
43 #endif
44