1 #ifndef BOOST_METAPARSE_V1_CPP98_IMPL_SIZE_HPP
2 #define BOOST_METAPARSE_V1_CPP98_IMPL_SIZE_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/cpp98/fwd/string.hpp>
11 #include <boost/mpl/int.hpp>
13 #include <boost/preprocessor/arithmetic/sub.hpp>
14 #include <boost/preprocessor/punctuation/comma_if.hpp>
15 #include <boost/preprocessor/repetition/enum.hpp>
16 #include <boost/preprocessor/repetition/enum_params.hpp>
17 #include <boost/preprocessor/repetition/repeat.hpp>
18 #include <boost/preprocessor/tuple/eat.hpp>
31 #ifdef BOOST_METAPARSE_STRING_CASE
32 # error BOOST_METAPARSE_STRING_CASE
34 #define BOOST_METAPARSE_STRING_CASE(z, n, unused) \
35 template <BOOST_PP_ENUM_PARAMS(n, int C)> \
39 BOOST_PP_ENUM_PARAMS(n, C) BOOST_PP_COMMA_IF(n) \
41 BOOST_PP_SUB(BOOST_METAPARSE_LIMIT_STRING_SIZE, n), \
42 BOOST_NO_CHAR BOOST_PP_TUPLE_EAT(3), \
51 BOOST_METAPARSE_LIMIT_STRING_SIZE,
52 BOOST_METAPARSE_STRING_CASE,
56 #undef BOOST_METAPARSE_STRING_CASE