1 #ifndef BOOST_METAPARSE_V1_IMPL_SEQUENCE_HPP
2 #define BOOST_METAPARSE_V1_IMPL_SEQUENCE_HPP
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)
9 #include <boost/metaparse/v1/impl/sequence_impl.hpp>
10 #include <boost/metaparse/limit_sequence_size.hpp>
12 #include <boost/mpl/vector.hpp>
14 #include <boost/preprocessor/repetition/repeat_from_to.hpp>
15 #include <boost/preprocessor/repetition/enum_params.hpp>
16 #include <boost/preprocessor/cat.hpp>
26 #ifdef BOOST_METAPARSE_SEQUENCE_CASE
27 # error BOOST_METAPARSE_SEQUENCE_CASE already defined
29 #define BOOST_METAPARSE_SEQUENCE_CASE(z, n, unused) \
30 template <BOOST_PP_ENUM_PARAMS(n, class P)> \
31 struct BOOST_PP_CAT(sequence, n) \
33 typedef BOOST_PP_CAT(sequence, n) type; \
35 template <class S, class Pos> \
38 boost::mpl::vector<BOOST_PP_ENUM_PARAMS(n, P)>, \
45 BOOST_PP_REPEAT_FROM_TO(
47 BOOST_METAPARSE_LIMIT_SEQUENCE_SIZE,
48 BOOST_METAPARSE_SEQUENCE_CASE,
52 #undef BOOST_METAPARSE_SEQUENCE_CASE