]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/phoenix/core/detail/cpp03/function_eval.hpp
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / boost / boost / phoenix / core / detail / cpp03 / function_eval.hpp
1 #if !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES)
2
3 #include <boost/phoenix/core/detail/cpp03/preprocessed/function_eval.hpp>
4
5 #else
6
7 #if !BOOST_PHOENIX_IS_ITERATING
8
9 #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
10 #pragma wave option(preserve: 2, line: 0, output: "preprocessed/function_eval_" BOOST_PHOENIX_LIMIT_STR ".hpp")
11 #endif
12 /*=============================================================================
13 Copyright (c) 2001-2007 Joel de Guzman
14
15 Distributed under the Boost Software License, Version 1.0. (See accompanying
16 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
17 ==============================================================================*/
18
19 #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
20 #pragma wave option(preserve: 1)
21 #endif
22
23 #define PHOENIX_GET_ARG(z, n, data) \
24 typedef \
25 typename boost::add_reference< \
26 typename boost::add_const< \
27 typename boost::result_of< \
28 boost::phoenix::evaluator( \
29 BOOST_PP_CAT(A, n) \
30 , Context \
31 ) \
32 >::type \
33 >::type \
34 >::type \
35 BOOST_PP_CAT(a, n);
36
37 #define PHOENIX_EVAL_ARG(z, n, data) \
38 help_rvalue_deduction(boost::phoenix::eval(BOOST_PP_CAT(a, n), ctx))
39
40 #define M0(z, n, data) \
41 typename proto::detail::uncvref<BOOST_PP_CAT(a, n)>::type
42
43 #define BOOST_PHOENIX_ITERATION_PARAMS \
44 (3, (1, BOOST_PP_DEC(BOOST_PHOENIX_ACTOR_LIMIT), \
45 <boost/phoenix/core/detail/cpp03/function_eval.hpp>))
46 #include BOOST_PHOENIX_ITERATE()
47
48 #undef PHOENIX_GET_ARG
49 #undef PHOENIX_EVAL_ARG
50 #undef M0
51
52 #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
53 #pragma wave option(output: null)
54 #endif
55
56 #else
57 template <
58 typename This
59 , typename F
60 , BOOST_PHOENIX_typename_A
61 , typename Context
62 >
63 struct result<This(F, BOOST_PHOENIX_A, Context)>
64 {
65 typedef typename
66 remove_reference<
67 typename boost::result_of<evaluator(F, Context)>::type
68 >::type
69 fn;
70
71 BOOST_PP_REPEAT(BOOST_PHOENIX_ITERATION, PHOENIX_GET_ARG, _)
72
73 typedef typename
74 boost::result_of<fn(BOOST_PHOENIX_a)>::type
75 type;
76 };
77
78 template <typename F, BOOST_PHOENIX_typename_A, typename Context>
79 typename result<
80 function_eval(
81 F const &
82 , BOOST_PHOENIX_A_ref
83 , Context const &
84 )
85 >::type
86 operator()(F const & f, BOOST_PHOENIX_A_ref_a, Context const & ctx) const
87 {
88 return boost::phoenix::eval(f, ctx)(BOOST_PP_ENUM(BOOST_PHOENIX_ITERATION, PHOENIX_EVAL_ARG, _));
89 }
90
91 template <typename F, BOOST_PHOENIX_typename_A, typename Context>
92 typename result<
93 function_eval(
94 F &
95 , BOOST_PHOENIX_A_ref
96 , Context const &
97 )
98 >::type
99 operator()(F & f, BOOST_PHOENIX_A_ref_a, Context const & ctx) const
100 {
101 return boost::phoenix::eval(f, ctx)(BOOST_PP_ENUM(BOOST_PHOENIX_ITERATION, PHOENIX_EVAL_ARG, _));
102 }
103 #endif
104
105 #endif