]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/metaparse/include/boost/metaparse/v1/impl/skip_seq.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / metaparse / include / boost / metaparse / v1 / impl / skip_seq.hpp
1 #ifndef BOOST_METAPARSE_V1_IMPL_SKIP_SEQ_HPP
2 #define BOOST_METAPARSE_V1_IMPL_SKIP_SEQ_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/is_error.hpp>
10 #include <boost/metaparse/v1/accept.hpp>
11 #include <boost/metaparse/v1/get_remaining.hpp>
12 #include <boost/metaparse/v1/get_position.hpp>
13 #include <boost/metaparse/v1/get_result.hpp>
14
15 namespace boost
16 {
17 namespace metaparse
18 {
19 namespace v1
20 {
21 namespace impl
22 {
23 struct skip_seq
24 {
25 private:
26 template <class ParsingResult, class NewResultValue>
27 struct change_result :
28 accept<
29 NewResultValue,
30 typename get_remaining<ParsingResult>::type,
31 typename get_position<ParsingResult>::type
32 >
33 {};
34
35 template <class Result, class P>
36 struct apply_unchecked :
37 boost::mpl::eval_if<
38 typename is_error<
39 typename P::template apply<
40 typename get_remaining<Result>::type,
41 typename get_position<Result>::type
42 >
43 >::type,
44 typename P::template apply<
45 typename get_remaining<Result>::type,
46 typename get_position<Result>::type
47 >,
48 change_result<
49 typename P::template apply<
50 typename get_remaining<Result>::type,
51 typename get_position<Result>::type
52 >,
53 typename get_result<Result>::type
54 >
55 >
56 {};
57
58 public:
59 template <class Result, class P>
60 struct apply :
61 boost::mpl::eval_if<
62 is_error<Result>,
63 Result,
64 apply_unchecked<Result, P>
65 >
66 {};
67 };
68 }
69 }
70 }
71 }
72
73 #endif
74