]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | #ifndef BOOST_METAPARSE_V1_IMPL_ONE_OF_FWD_OP_HPP |
2 | #define BOOST_METAPARSE_V1_IMPL_ONE_OF_FWD_OP_HPP | |
3 | ||
4 | // Copyright Abel Sinkovics (abel@sinkovics.hu) 2015. | |
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/impl/later_result.hpp> | |
11 | ||
12 | #include <boost/mpl/eval_if.hpp> | |
13 | ||
14 | namespace boost | |
15 | { | |
16 | namespace metaparse | |
17 | { | |
18 | namespace v1 | |
19 | { | |
20 | namespace impl | |
21 | { | |
22 | template <class S, class Pos> | |
23 | struct one_of_fwd_op | |
24 | { | |
25 | typedef one_of_fwd_op type; | |
26 | ||
27 | template <class State, class P> | |
28 | struct apply : | |
29 | boost::mpl::eval_if< | |
30 | typename is_error<State>::type, | |
31 | boost::mpl::eval_if< | |
32 | typename is_error<typename P::template apply<S, Pos> >::type, | |
33 | later_result<State, typename P::template apply<S, Pos> >, | |
34 | typename P::template apply<S, Pos> | |
35 | >, | |
36 | State | |
37 | > | |
38 | {}; | |
39 | }; | |
40 | } | |
41 | } | |
42 | } | |
43 | } | |
44 | ||
45 | #endif | |
46 |