]> git.sesse.net Git - casparcg/blob - dependencies/boost/boost/spirit/home/phoenix/function/detail/function_call.hpp
Manually merged pull request #222
[casparcg] / dependencies / boost / boost / spirit / home / phoenix / function / detail / function_call.hpp
1 /*=============================================================================
2     Copyright (c) 2001-2007 Joel de Guzman
3
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
8 #ifndef PHOENIX_FUNCTION_DETAIL_FUNCTION_CALL_HPP
9 #define PHOENIX_FUNCTION_DETAIL_FUNCTION_CALL_HPP
10
11 #include <boost/preprocessor/iterate.hpp>
12 #include <boost/preprocessor/repetition/enum_params.hpp>
13 #include <boost/preprocessor/repetition/enum_binary_params.hpp>
14
15 #define BOOST_PP_ITERATION_PARAMS_1                                             \
16     (3, (3, BOOST_PP_DEC(PHOENIX_COMPOSITE_LIMIT),                              \
17     "boost/spirit/home/phoenix/function/detail/function_call.hpp"))
18 #include BOOST_PP_ITERATE()
19
20 #endif
21
22 ///////////////////////////////////////////////////////////////////////////////
23 //
24 //  Preprocessor vertical repetition code
25 //
26 ///////////////////////////////////////////////////////////////////////////////
27 #else // defined(BOOST_PP_IS_ITERATING)
28
29 #define N BOOST_PP_ITERATION()
30
31     template <BOOST_PP_ENUM_PARAMS(N, typename A)>
32     actor<typename as_composite<detail::function_eval<N>, F
33       , BOOST_PP_ENUM_PARAMS(N, A)>::type>
34     operator()(BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& _)) const
35     {
36         return compose<detail::function_eval<N> >(f, BOOST_PP_ENUM_PARAMS(N, _));
37     }
38
39 #undef N
40 #endif // defined(BOOST_PP_IS_ITERATING)
41
42