]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/phoenix/include/boost/phoenix/core/detail/cpp03/call.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / phoenix / include / boost / phoenix / core / detail / cpp03 / call.hpp
1
2 #if !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES)
3 #ifndef BOOST_PHOENIX_CORE_DETAIL_CALL_HPP
4 #define BOOST_PHOENIX_CORE_DETAIL_CALL_HPP
5
6 #include <boost/phoenix/core/detail/cpp03/preprocessed/call.hpp>
7
8 #endif
9 #else
10
11 #if !BOOST_PHOENIX_IS_ITERATING
12
13 #ifndef BOOST_PHOENIX_CORE_DETAIL_CALL_HPP
14 #define BOOST_PHOENIX_CORE_DETAIL_CALL_HPP
15
16 #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
17 #pragma wave option(preserve: 2, line: 0, output: "preprocessed/call_" BOOST_PHOENIX_LIMIT_STR ".hpp")
18 #endif
19
20 /*==============================================================================
21 Copyright (c) 2005-2010 Joel de Guzman
22 Copyright (c) 2010 Thomas Heller
23
24 Distributed under the Boost Software License, Version 1.0. (See accompanying
25 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
26 ==============================================================================*/
27
28 #include <boost/phoenix/support/iterate.hpp>
29
30 #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
31 #pragma wave option(preserve: 1)
32 #endif
33
34 #define M0(Z, N ,D) \
35 typedef \
36 typename proto::result_of::child_c<Expr, N>::type \
37 BOOST_PP_CAT(A, N); \
38 /**/
39 #define M1(Z, N ,D) \
40 BOOST_PP_COMMA_IF(N) proto::child_c<N>(e)
41 /**/
42
43
44 #define BOOST_PHOENIX_ITERATION_PARAMS \
45 (3, (1, BOOST_PHOENIX_LIMIT, \
46 <boost/phoenix/core/detail/cpp03/call.hpp>))
47 #include BOOST_PHOENIX_ITERATE()
48
49 #undef M0
50 #undef M1
51
52 #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
53 #pragma wave option(output: null)
54 #endif
55
56 #endif
57
58 #else
59
60 template <typename Fun, typename Expr, typename State, typename Data>
61 struct call_impl<Fun, Expr, State, Data, BOOST_PHOENIX_ITERATION>
62 : proto::transform_impl<Expr, State, Data>
63 {
64 typedef
65 typename boost::phoenix::result_of::context<State, Data>::type
66 context_type;
67
68 BOOST_PP_REPEAT(BOOST_PHOENIX_ITERATION, M0, _)
69
70 typedef
71 typename boost::result_of<
72 Fun(BOOST_PHOENIX_A, context_type)
73 >::type
74 result_type;
75
76 result_type operator()(
77 typename call_impl::expr_param e
78 , typename call_impl::state_param s
79 , typename call_impl::data_param d
80 ) const
81 {
82 return
83 Fun()(
84 BOOST_PP_REPEAT(BOOST_PHOENIX_ITERATION, M1, _)
85 , boost::phoenix::context(s, d)
86 );
87 }
88 };
89
90 #endif
91
92 #endif // BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES