]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/phoenix/include/boost/phoenix/core/detail/cpp03/expression.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / phoenix / include / boost / phoenix / core / detail / cpp03 / expression.hpp
1
2 #if !BOOST_PHOENIX_IS_ITERATING
3
4 #include <boost/phoenix/support/iterate.hpp>
5 #include <boost/preprocessor/comparison/equal.hpp>
6
7 #if !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES)
8
9 #include <boost/phoenix/core/detail/cpp03/preprocessed/expression.hpp>
10
11 #else
12
13 #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
14 #pragma wave option(preserve: 2, line: 0, output: "preprocessed/expression_" BOOST_PHOENIX_LIMIT_STR ".hpp")
15 #endif
16
17 /*=============================================================================
18 Copyright (c) 2005-2010 Joel de Guzman
19 Copyright (c) 2010 Eric Niebler
20 Copyright (c) 2010 Thomas Heller
21
22 Distributed under the Boost Software License, Version 1.0. (See accompanying
23 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
24 ==============================================================================*/
25
26 #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
27 #pragma wave option(preserve: 1)
28 #endif
29
30 template <
31 template <typename> class Actor
32 , typename Tag
33 , BOOST_PHOENIX_typename_A_void(BOOST_PHOENIX_COMPOSITE_LIMIT)
34 , typename Dummy = void>
35 struct expr_ext;
36
37 template <
38 typename Tag
39 , BOOST_PHOENIX_typename_A_void(BOOST_PHOENIX_COMPOSITE_LIMIT)
40 , typename Dummy = void
41 >
42 struct expr : expr_ext<actor, Tag, BOOST_PHOENIX_A(BOOST_PHOENIX_COMPOSITE_LIMIT)> {};
43
44 #define M0(Z, N, D) \
45 BOOST_PP_COMMA_IF(N) \
46 typename proto::detail::uncvref<typename call_traits<BOOST_PP_CAT(A, N)>::value_type>::type
47
48 #define M1(Z, N, D) \
49 BOOST_PP_COMMA_IF(N) typename call_traits<BOOST_PP_CAT(A, N)>::param_type BOOST_PP_CAT(a, N)
50
51 #define BOOST_PHOENIX_ITERATION_PARAMS \
52 (3, (1, BOOST_PHOENIX_COMPOSITE_LIMIT, \
53 <boost/phoenix/core/detail/cpp03/expression.hpp>)) \
54 /**/
55 #include BOOST_PHOENIX_ITERATE()
56
57 #undef M0
58 #undef M1
59
60 #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
61 #pragma wave option(output: null)
62 #endif
63
64 #endif // PHOENIX_DONT_USE_PREPROCESSED_FILES
65
66 #else
67 template <template <typename> class Actor, typename Tag, BOOST_PHOENIX_typename_A>
68 struct expr_ext<Actor, Tag, BOOST_PHOENIX_A>
69 : proto::transform<expr_ext<Actor, Tag, BOOST_PHOENIX_A>, int>
70 {
71 typedef
72 typename proto::result_of::make_expr<
73 Tag
74 , phoenix_default_domain //proto::basic_default_domain
75 , BOOST_PP_REPEAT(BOOST_PHOENIX_ITERATION, M0, _)
76 >::type
77 base_type;
78
79 typedef Actor<base_type> type;
80
81 typedef
82 typename proto::nary_expr<Tag, BOOST_PHOENIX_A>::proto_grammar
83 proto_grammar;
84
85 static type make(BOOST_PP_REPEAT(BOOST_PHOENIX_ITERATION, M1, _))
86 { //?? actor or Actor??
87 //Actor<base_type> const e =
88 actor<base_type> const e =
89 {
90 proto::make_expr<
91 Tag
92 , phoenix_default_domain // proto::basic_default_domain
93 >(BOOST_PHOENIX_a)
94 };
95 return e;
96 }
97
98 template<typename Expr, typename State, typename Data>
99 struct impl
100 : proto::pass_through<expr_ext>::template impl<Expr, State, Data>
101 {};
102
103 typedef Tag proto_tag;
104 #define BOOST_PHOENIX_ENUM_CHILDREN(_, N, __) \
105 typedef BOOST_PP_CAT(A, N) BOOST_PP_CAT(proto_child, N); \
106 /**/
107 BOOST_PP_REPEAT(BOOST_PHOENIX_ITERATION, BOOST_PHOENIX_ENUM_CHILDREN, _)
108 #undef BOOST_PHOENIX_ENUM_CHILDREN
109 };
110
111 #endif