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_AT_C_HPP
0002 #define BOOST_METAPARSE_V1_CPP98_IMPL_AT_C_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/config.hpp>
0010 #include <boost/metaparse/v1/cpp98/fwd/string.hpp>
0011 
0012 #include <boost/mpl/char.hpp>
0013 
0014 #include <boost/preprocessor/repetition/enum_params.hpp>
0015 #include <boost/preprocessor/repetition/repeat.hpp>
0016 
0017 namespace boost
0018 {
0019   namespace metaparse
0020   {
0021     namespace v1
0022     {
0023       namespace impl
0024       {
0025         template <class S, int N>
0026         struct at_c;
0027 
0028         #ifdef BOOST_METAPARSE_STRING_CASE
0029         #  error BOOST_METAPARSE_STRING_CASE is already defined
0030         #endif
0031         #define BOOST_METAPARSE_STRING_CASE(z, n, unused) \
0032           template < \
0033             BOOST_PP_ENUM_PARAMS(BOOST_METAPARSE_LIMIT_STRING_SIZE, int C) \
0034           > \
0035           struct \
0036             at_c< \
0037               string< \
0038                 BOOST_PP_ENUM_PARAMS(BOOST_METAPARSE_LIMIT_STRING_SIZE, C) \
0039               >, \
0040               n \
0041             > : \
0042             boost::mpl::char_<BOOST_PP_CAT(C, n)> \
0043           {};
0044       
0045         BOOST_PP_REPEAT(
0046           BOOST_METAPARSE_LIMIT_STRING_SIZE,
0047           BOOST_METAPARSE_STRING_CASE,
0048           ~
0049         )
0050 
0051         #undef BOOST_METAPARSE_STRING_CASE
0052       }
0053     }
0054   }
0055 }
0056 
0057 #endif
0058