/src/contrib/boost/spirit/home/phoenix/function/detail/function_call.hpp

http://pythonocc.googlecode.com/ · C++ Header · 42 lines · 22 code · 9 blank · 11 comment · 0 complexity · 1ffcadaded39598e0cee35173e560a1b MD5 · raw file

  1. /*=============================================================================
  2. Copyright (c) 2001-2007 Joel de Guzman
  3. Distributed under the Boost Software License, Version 1.0. (See accompanying
  4. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. ==============================================================================*/
  6. #ifndef BOOST_PP_IS_ITERATING
  7. #ifndef PHOENIX_FUNCTION_DETAIL_FUNCTION_CALL_HPP
  8. #define PHOENIX_FUNCTION_DETAIL_FUNCTION_CALL_HPP
  9. #include <boost/preprocessor/iterate.hpp>
  10. #include <boost/preprocessor/repetition/enum_params.hpp>
  11. #include <boost/preprocessor/repetition/enum_binary_params.hpp>
  12. #define BOOST_PP_ITERATION_PARAMS_1 \
  13. (3, (3, BOOST_PP_DEC(PHOENIX_COMPOSITE_LIMIT), \
  14. "boost/spirit/home/phoenix/function/detail/function_call.hpp"))
  15. #include BOOST_PP_ITERATE()
  16. #endif
  17. ///////////////////////////////////////////////////////////////////////////////
  18. //
  19. // Preprocessor vertical repetition code
  20. //
  21. ///////////////////////////////////////////////////////////////////////////////
  22. #else // defined(BOOST_PP_IS_ITERATING)
  23. #define N BOOST_PP_ITERATION()
  24. template <BOOST_PP_ENUM_PARAMS(N, typename A)>
  25. actor<typename as_composite<detail::function_eval<N>, F
  26. , BOOST_PP_ENUM_PARAMS(N, A)>::type>
  27. operator()(BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& _)) const
  28. {
  29. return compose<detail::function_eval<N> >(f, BOOST_PP_ENUM_PARAMS(N, _));
  30. }
  31. #undef N
  32. #endif // defined(BOOST_PP_IS_ITERATING)