1 #ifndef BOOST_METAPARSE_V1_CPP11_SEQUENCE_HPP
2 #define BOOST_METAPARSE_V1_CPP11_SEQUENCE_HPP
4 // Copyright Abel Sinkovics (abel@sinkovics.hu) 2018.
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)
9 #include <boost/metaparse/v1/cpp11/impl/push_front_result.hpp>
11 #include <boost/metaparse/v1/get_remaining.hpp>
12 #include <boost/metaparse/v1/get_position.hpp>
13 #include <boost/metaparse/v1/is_error.hpp>
14 #include <boost/metaparse/v1/return_.hpp>
15 #include <boost/metaparse/v1/transform.hpp>
17 #include <boost/mpl/eval_if.hpp>
18 #include <boost/mpl/vector.hpp>
26 template <class... Ps>
30 struct sequence<> : return_<boost::mpl::vector<>> {};
32 template <class P, class... Ps>
33 struct sequence<P, Ps...>
37 struct apply_unchecked :
40 impl::push_front_result<Res>
42 typename get_remaining<Res>::type,
43 typename get_position<Res>::type
47 typedef sequence type;
49 template <class S, class Pos>
52 typename is_error<typename P::template apply<S, Pos>>::type,
53 typename P::template apply<S, Pos>,
54 apply_unchecked<typename P::template apply<S, Pos>>