Chris@16
|
1
|
Chris@16
|
2 #if !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES)
|
Chris@16
|
3 #ifndef BOOST_PHOENIX_OBJECT_DETAIL_NEW_EVAL_HPP
|
Chris@16
|
4 #define BOOST_PHOENIX_OBJECT_DETAIL_NEW_EVAL_HPP
|
Chris@16
|
5
|
Chris@16
|
6 #include <boost/phoenix/object/detail/preprocessed/new_eval.hpp>
|
Chris@16
|
7
|
Chris@16
|
8 #endif
|
Chris@16
|
9 #else
|
Chris@16
|
10
|
Chris@16
|
11 #if !BOOST_PHOENIX_IS_ITERATING
|
Chris@16
|
12
|
Chris@16
|
13 #ifndef BOOST_PHOENIX_OBJECT_DETAIL_NEW_EVAL_HPP
|
Chris@16
|
14 #define BOOST_PHOENIX_OBJECT_DETAIL_NEW_EVAL_HPP
|
Chris@16
|
15
|
Chris@16
|
16 #include <boost/preprocessor/repetition/enum_shifted_binary_params.hpp>
|
Chris@16
|
17
|
Chris@16
|
18 #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
|
Chris@16
|
19 #pragma wave option(preserve: 2, line: 0, output: "preprocessed/new_eval_" BOOST_PHOENIX_LIMIT_STR ".hpp")
|
Chris@16
|
20 #endif
|
Chris@16
|
21
|
Chris@16
|
22 /*==============================================================================
|
Chris@16
|
23 Copyright (c) 2005-2010 Joel de Guzman
|
Chris@16
|
24 Copyright (c) 2010 Thomas Heller
|
Chris@16
|
25
|
Chris@16
|
26 Distributed under the Boost Software License, Version 1.0. (See accompanying
|
Chris@16
|
27 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
28 ==============================================================================*/
|
Chris@16
|
29
|
Chris@16
|
30 #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
|
Chris@16
|
31 #pragma wave option(preserve: 1)
|
Chris@16
|
32 #endif
|
Chris@16
|
33
|
Chris@16
|
34 #define BOOST_PHOENIX_ITERATION_PARAMS \
|
Chris@16
|
35 (3, (2, BOOST_PHOENIX_COMPOSITE_LIMIT, \
|
Chris@16
|
36 <boost/phoenix/object/detail/new_eval.hpp>))
|
Chris@16
|
37 #include BOOST_PHOENIX_ITERATE()
|
Chris@16
|
38
|
Chris@16
|
39 #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
|
Chris@16
|
40 #pragma wave option(output: null)
|
Chris@16
|
41 #endif
|
Chris@16
|
42
|
Chris@16
|
43 #endif
|
Chris@16
|
44
|
Chris@16
|
45 #else
|
Chris@16
|
46
|
Chris@16
|
47 template <typename This, BOOST_PHOENIX_typename_A, typename Context>
|
Chris@16
|
48 struct result<This(BOOST_PHOENIX_A, Context)>
|
Chris@16
|
49 {
|
Chris@16
|
50 typedef
|
Chris@16
|
51 typename proto::detail::uncvref<
|
Chris@16
|
52 typename proto::result_of::value<A0>::type
|
Chris@16
|
53 >::type
|
Chris@16
|
54 target_type;
|
Chris@16
|
55 typedef typename target_type::type construct_type;
|
Chris@16
|
56 typedef typename target_type::type * type;
|
Chris@16
|
57 };
|
Chris@16
|
58
|
Chris@16
|
59 template <BOOST_PHOENIX_typename_A, typename Context>
|
Chris@16
|
60 typename result<new_eval(BOOST_PHOENIX_A_const_ref, Context &)>::type
|
Chris@16
|
61 operator()(
|
Chris@16
|
62 A0 const&
|
Chris@16
|
63 , BOOST_PP_ENUM_SHIFTED_BINARY_PARAMS(
|
Chris@16
|
64 BOOST_PHOENIX_ITERATION
|
Chris@16
|
65 , A
|
Chris@16
|
66 , const& a
|
Chris@16
|
67 )
|
Chris@16
|
68 , Context const & ctx
|
Chris@16
|
69 ) const
|
Chris@16
|
70 {
|
Chris@16
|
71 #define EVAL_a(_,n,__) \
|
Chris@16
|
72 BOOST_PP_COMMA_IF(BOOST_PP_DEC(n)) boost::phoenix::eval(a ## n, ctx)
|
Chris@16
|
73 return
|
Chris@16
|
74 new typename result<
|
Chris@16
|
75 new_eval(BOOST_PHOENIX_A_const_ref, Context &)
|
Chris@16
|
76 >::construct_type(
|
Chris@16
|
77 BOOST_PP_REPEAT_FROM_TO(
|
Chris@16
|
78 1
|
Chris@16
|
79 , BOOST_PHOENIX_ITERATION
|
Chris@16
|
80 , EVAL_a
|
Chris@16
|
81 , _
|
Chris@16
|
82 )
|
Chris@16
|
83 );
|
Chris@16
|
84 #undef EVAL_a
|
Chris@16
|
85 }
|
Chris@16
|
86
|
Chris@16
|
87 #endif
|
Chris@16
|
88
|
Chris@16
|
89 #endif // BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES
|