Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:40:48

0001 #ifndef BOOST_METAPARSE_V1_CPP98_IMPL_POP_FRONT_HPP
0002 #define BOOST_METAPARSE_V1_CPP98_IMPL_POP_FRONT_HPP
0003 
0004 // Copyright Abel Sinkovics (abel@sinkovics.hu)  2013.
0005 // Distributed under the Boost Software License, Version 1.0.
0006 //    (See accompanying file LICENSE_1_0.txt or copy at
0007 //          http://www.boost.org/LICENSE_1_0.txt)
0008 
0009 #include <boost/metaparse/v1/cpp98/fwd/string.hpp>
0010 
0011 #include <boost/preprocessor/repetition/enum_params.hpp>
0012 #include <boost/preprocessor/repetition/repeat_from_to.hpp>
0013 
0014 namespace boost
0015 {
0016   namespace metaparse
0017   {
0018     namespace v1
0019     {
0020       namespace impl
0021       {
0022         template <class S>
0023         struct pop_front;
0024 
0025         #ifdef BOOST_METAPARSE_POP_FRONT
0026         #  error BOOST_METAPARSE_POP_FRONT already defined
0027         #endif
0028         #define BOOST_METAPARSE_POP_FRONT(z, n, unused) \
0029           BOOST_PP_COMMA_IF(BOOST_PP_DEC(n)) BOOST_PP_CAT(C, n)
0030 
0031         template < \
0032           BOOST_PP_ENUM_PARAMS(BOOST_METAPARSE_LIMIT_STRING_SIZE, int C) \
0033         >
0034         struct
0035           pop_front<
0036             string<BOOST_PP_ENUM_PARAMS(BOOST_METAPARSE_LIMIT_STRING_SIZE, C)>
0037           > :
0038           string<
0039             BOOST_PP_REPEAT_FROM_TO(
0040               1,
0041               BOOST_METAPARSE_LIMIT_STRING_SIZE,
0042               BOOST_METAPARSE_POP_FRONT,
0043               ~
0044             ),
0045             BOOST_NO_CHAR
0046           >
0047         {};
0048 
0049         #undef BOOST_METAPARSE_POP_FRONT
0050       }
0051     }
0052   }
0053 }
0054 
0055 #endif
0056