construct_eval.hpp 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. #if !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES)
  2. #ifndef BOOST_PHOENIX_OBJECT_DETAIL_CONSTRUCT_EVAL_HPP
  3. #define BOOST_PHOENIX_OBJECT_DETAIL_CONSTRUCT_EVAL_HPP
  4. #include <boost/phoenix/object/detail/cpp03/preprocessed/construct_eval.hpp>
  5. #endif
  6. #else
  7. #if !BOOST_PHOENIX_IS_ITERATING
  8. #ifndef BOOST_PHOENIX_OBJECT_DETAIL_CONSTRUCT_EVAL_HPP
  9. #define BOOST_PHOENIX_OBJECT_DETAIL_CONSTRUCT_EVAL_HPP
  10. #include <boost/preprocessor/repetition/enum_shifted_binary_params.hpp>
  11. #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
  12. #pragma wave option(preserve: 2, line: 0, output: "preprocessed/construct_eval_" BOOST_PHOENIX_LIMIT_STR ".hpp")
  13. #endif
  14. /*==============================================================================
  15. Copyright (c) 2005-2010 Joel de Guzman
  16. Copyright (c) 2010 Thomas Heller
  17. Distributed under the Boost Software License, Version 1.0. (See accompanying
  18. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  19. ==============================================================================*/
  20. #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
  21. #pragma wave option(preserve: 1)
  22. #endif
  23. #define BOOST_PHOENIX_ITERATION_PARAMS \
  24. (3, (2, BOOST_PHOENIX_COMPOSITE_LIMIT, \
  25. <boost/phoenix/object/detail/cpp03/construct_eval.hpp>))
  26. #include BOOST_PHOENIX_ITERATE()
  27. #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
  28. #pragma wave option(output: null)
  29. #endif
  30. #endif
  31. #else
  32. template <typename This, BOOST_PHOENIX_typename_A, typename Context>
  33. struct result<This(BOOST_PHOENIX_A, Context)>
  34. : detail::result_of::target<A0>
  35. {
  36. };
  37. template <BOOST_PHOENIX_typename_A, typename Context>
  38. typename detail::result_of::target<A0>::type
  39. operator()(
  40. A0 const&
  41. , BOOST_PP_ENUM_SHIFTED_BINARY_PARAMS(
  42. BOOST_PHOENIX_ITERATION
  43. , A
  44. , const& a
  45. )
  46. , Context const & ctx
  47. ) const
  48. {
  49. #define EVAL_a(_,n,__) \
  50. BOOST_PP_COMMA_IF(BOOST_PP_DEC(n)) boost::phoenix::eval(a ## n, ctx)
  51. return
  52. typename detail::result_of::target<A0>::type(
  53. BOOST_PP_REPEAT_FROM_TO(
  54. 1
  55. , BOOST_PHOENIX_ITERATION
  56. , EVAL_a, _
  57. )
  58. );
  59. #undef EVAL_a
  60. }
  61. #endif
  62. #endif // BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES