File indexing completed on 2025-01-18 09:40:48
0001 #ifndef BOOST_METAPARSE_V1_CPP98_IMPL_SEQUENCE_HPP
0002 #define BOOST_METAPARSE_V1_CPP98_IMPL_SEQUENCE_HPP
0003
0004
0005
0006
0007
0008
0009 #include <boost/metaparse/v1/cpp98/impl/sequence_impl.hpp>
0010 #include <boost/metaparse/limit_sequence_size.hpp>
0011
0012 #include <boost/mpl/vector.hpp>
0013
0014 #include <boost/preprocessor/repetition/repeat_from_to.hpp>
0015 #include <boost/preprocessor/repetition/enum_params.hpp>
0016 #include <boost/preprocessor/cat.hpp>
0017
0018 namespace boost
0019 {
0020 namespace metaparse
0021 {
0022 namespace v1
0023 {
0024 namespace impl
0025 {
0026 #ifdef BOOST_METAPARSE_SEQUENCE_CASE
0027 # error BOOST_METAPARSE_SEQUENCE_CASE already defined
0028 #endif
0029 #define BOOST_METAPARSE_SEQUENCE_CASE(z, n, unused) \
0030 template <BOOST_PP_ENUM_PARAMS(n, class P)> \
0031 struct BOOST_PP_CAT(sequence, n) \
0032 { \
0033 typedef BOOST_PP_CAT(sequence, n) type; \
0034 \
0035 template <class S, class Pos> \
0036 struct apply : \
0037 sequence_impl< \
0038 boost::mpl::vector<BOOST_PP_ENUM_PARAMS(n, P)>, \
0039 S, \
0040 Pos \
0041 > \
0042 {}; \
0043 };
0044
0045 BOOST_PP_REPEAT_FROM_TO(
0046 1,
0047 BOOST_METAPARSE_LIMIT_SEQUENCE_SIZE,
0048 BOOST_METAPARSE_SEQUENCE_CASE,
0049 ~
0050 )
0051
0052 #undef BOOST_METAPARSE_SEQUENCE_CASE
0053 }
0054 }
0055 }
0056 }
0057
0058 #endif
0059