1 /*=============================================================================
2 Copyright (c) 2001-2011 Joel de Guzman
4 Distributed under the Boost Software License, Version 1.0. (See accompanying
5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 ==============================================================================*/
7 #ifndef BOOST_PP_IS_ITERATING
9 #include <boost/preprocessor/iterate.hpp>
10 #include <boost/preprocessor/repetition/enum_params.hpp>
11 #include <boost/preprocessor/repetition/enum_binary_params.hpp>
13 #define BOOST_PP_FILENAME_1 \
14 <boost/spirit/home/qi/nonterminal/detail/fcall.hpp>
15 #define BOOST_PP_ITERATION_LIMITS (1, SPIRIT_ARGUMENTS_LIMIT)
16 #include BOOST_PP_ITERATE()
18 ///////////////////////////////////////////////////////////////////////////////
20 // Preprocessor vertical repetition code
22 ///////////////////////////////////////////////////////////////////////////////
23 #else // defined(BOOST_PP_IS_ITERATING)
25 #define N BOOST_PP_ITERATION()
27 template <BOOST_PP_ENUM_PARAMS(N, typename A)>
28 typename lazy_enable_if_c<
31 spirit::qi::parameterized_nonterminal<
32 parameterized_subject_type
33 , fusion::vector<BOOST_PP_ENUM_PARAMS(N, A)> >
36 operator()(BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& f)) const
38 typedef fusion::vector<BOOST_PP_ENUM_PARAMS(N, A)> vector_type;
39 typedef spirit::qi::parameterized_nonterminal<
40 parameterized_subject_type, vector_type> parameterized_type;
41 typedef typename proto::terminal<parameterized_type>::type result_type;
43 return result_type::make(
45 this->get_parameterized_subject()
46 , fusion::make_vector(BOOST_PP_ENUM_PARAMS(N, f)))
51 #endif // defined(BOOST_PP_IS_ITERATING)