Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-19 09:47:37

0001 //  Copyright (c) 2001-2011 Joel de Guzman
0002 //  Copyright (c) 2001-2011 Hartmut Kaiser
0003 // 
0004 //  Distributed under the Boost Software License, Version 1.0. (See accompanying 
0005 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 
0007 #ifndef BOOST_PP_IS_ITERATING
0008 
0009 #include <boost/preprocessor/iterate.hpp>
0010 #include <boost/preprocessor/repetition/enum_params.hpp>
0011 #include <boost/preprocessor/repetition/enum_binary_params.hpp>
0012 
0013 #define BOOST_PP_FILENAME_1 \
0014     <boost/spirit/home/karma/nonterminal/detail/fcall.hpp>
0015 #define BOOST_PP_ITERATION_LIMITS (1, SPIRIT_ARGUMENTS_LIMIT)
0016 #include BOOST_PP_ITERATE()
0017 
0018 ///////////////////////////////////////////////////////////////////////////////
0019 //
0020 //  Preprocessor vertical repetition code
0021 //
0022 ///////////////////////////////////////////////////////////////////////////////
0023 #else // defined(BOOST_PP_IS_ITERATING)
0024 
0025 #define N BOOST_PP_ITERATION()
0026 
0027     template <BOOST_PP_ENUM_PARAMS(N, typename A)>
0028     typename lazy_enable_if_c<
0029         (params_size == N)
0030       , proto::terminal<
0031             spirit::karma::parameterized_nonterminal<
0032                 parameterized_subject_type
0033               , fusion::vector<BOOST_PP_ENUM_PARAMS(N, A)> >
0034         >
0035     >::type
0036     operator()(BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& f)) const
0037     {
0038         typedef fusion::vector<BOOST_PP_ENUM_PARAMS(N, A)> vector_type;
0039         typedef spirit::karma::parameterized_nonterminal<
0040             parameterized_subject_type, vector_type> parameterized_type;
0041         typedef typename proto::terminal<parameterized_type>::type result_type;
0042 
0043         return result_type::make(
0044             parameterized_type(
0045                 this->get_parameterized_subject()
0046               , fusion::make_vector(BOOST_PP_ENUM_PARAMS(N, f)))
0047         );
0048     }
0049 
0050 #undef N
0051 #endif // defined(BOOST_PP_IS_ITERATING)
0052 
0053