1 #ifndef BOOST_METAPARSE_V1_IMPL_POP_FRONT_HPP
2 #define BOOST_METAPARSE_V1_IMPL_POP_FRONT_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/config.hpp>
10 #include <boost/metaparse/v1/fwd/string.hpp>
12 #include <boost/preprocessor/repetition/enum_params.hpp>
13 #include <boost/preprocessor/repetition/repeat_from_to.hpp>
26 #ifdef BOOST_METAPARSE_VARIADIC_STRING
27 template <char C, char... Cs>
28 struct pop_front<string<C, Cs...>> : string<Cs...> {};
30 #ifdef BOOST_METAPARSE_POP_FRONT
31 # error BOOST_METAPARSE_POP_FRONT already defined
33 #define BOOST_METAPARSE_POP_FRONT(z, n, unused) \
34 BOOST_PP_COMMA_IF(BOOST_PP_DEC(n)) BOOST_PP_CAT(C, n)
37 BOOST_PP_ENUM_PARAMS(BOOST_METAPARSE_LIMIT_STRING_SIZE, int C) \
41 string<BOOST_PP_ENUM_PARAMS(BOOST_METAPARSE_LIMIT_STRING_SIZE, C)>
44 BOOST_PP_REPEAT_FROM_TO(
46 BOOST_METAPARSE_LIMIT_STRING_SIZE,
47 BOOST_METAPARSE_POP_FRONT,
54 #undef BOOST_METAPARSE_POP_FRONT