/src/contrib/boost/spirit/home/phoenix/object/detail/construct.hpp

http://pythonocc.googlecode.com/ · C++ Header · 42 lines · 22 code · 9 blank · 11 comment · 0 complexity · 90245a77676906dc365e99eb541dc389 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_OBJECT_DETAIL_CONSTRUCT_HPP
  8. #define PHOENIX_OBJECT_DETAIL_CONSTRUCT_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, PHOENIX_COMPOSITE_LIMIT, \
  14. "boost/spirit/home/phoenix/object/detail/construct.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 <typename T, BOOST_PP_ENUM_PARAMS(N, typename A)>
  25. inline actor<typename as_composite<detail::construct_eval<T>
  26. , BOOST_PP_ENUM_PARAMS(N, A)>::type>
  27. construct(BOOST_PP_ENUM_BINARY_PARAMS(N, A, const& _))
  28. {
  29. return compose<detail::construct_eval<T> >(BOOST_PP_ENUM_PARAMS(N, _));
  30. }
  31. #undef N
  32. #endif // defined(BOOST_PP_IS_ITERATING)