]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/phoenix/include/boost/phoenix/support/vector.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / phoenix / include / boost / phoenix / support / vector.hpp
1 #ifdef BOOST_MSVC
2 #pragma warning(push)
3 #pragma warning(disable: 4512) // assignment operator could not be generated
4 #pragma warning(disable: 4510) // default constructor could not be generated
5 #pragma warning(disable: 4610) // can never be instantiated - user defined constructor required
6 #endif
7 #if !defined(BOOST_PHOENIX_DONT_USE_PREPROCESSED_FILES)
8
9 #ifndef BOOST_PHOENIX_SUPPORT_VECTOR_HPP
10 #define BOOST_PHOENIX_SUPPORT_VECTOR_HPP
11
12 #include <boost/phoenix/core/limits.hpp>
13 #include <boost/phoenix/support/iterate.hpp>
14 #include <boost/preprocessor/repetition/enum_shifted_params.hpp>
15 #include <boost/fusion/adapted/struct/adapt_struct.hpp>
16
17 #define BOOST_FUSION_ADAPT_TPL_STRUCT_NO_PARTIAL BOOST_FUSION_ADAPT_TPL_STRUCT
18
19 #include <boost/phoenix/support/preprocessed/vector.hpp>
20
21 #endif
22
23 #else
24
25 #if !BOOST_PHOENIX_IS_ITERATING
26
27 #ifndef BOOST_PHOENIX_SUPPORT_VECTOR_HPP
28 #define BOOST_PHOENIX_SUPPORT_VECTOR_HPP
29
30 #include <boost/phoenix/core/limits.hpp>
31 #include <boost/phoenix/support/iterate.hpp>
32 #include <boost/preprocessor/repetition/enum_shifted_params.hpp>
33 #include <boost/fusion/adapted/struct/adapt_struct.hpp>
34
35 #define BOOST_FUSION_ADAPT_TPL_STRUCT_NO_PARTIAL BOOST_FUSION_ADAPT_TPL_STRUCT
36
37 #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
38 #pragma wave option(preserve: 2, line: 0, output: "preprocessed/vector_" BOOST_PHOENIX_LIMIT_STR ".hpp")
39 #endif
40 /*==============================================================================
41 Copyright (c) 2005-2010 Joel de Guzman
42 Copyright (c) 2010 Thomas Heller
43
44 Distributed under the Boost Software License, Version 1.0. (See accompanying
45 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
46 ==============================================================================*/
47 #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
48 #pragma wave option(preserve: 1)
49 #endif
50
51 #define M0(Z, N, D) \
52 typedef BOOST_PP_CAT(A, N) BOOST_PP_CAT(member_type, N); \
53 BOOST_PP_CAT(A, N) BOOST_PP_CAT(a, N); \
54 /**/
55 #define M1(Z, N, D) \
56 (BOOST_PP_CAT(A, N)) \
57 /**/
58 #define M2(Z, N, D) \
59 (BOOST_PP_CAT(T, N)) \
60 /**/
61 #define M3(Z, N, D) \
62 (BOOST_PP_CAT(A, N), BOOST_PP_CAT(a, N)) \
63 /**/
64
65 namespace boost { namespace phoenix
66 {
67 template <typename Dummy = void>
68 struct vector0
69 {
70 typedef mpl::int_<0> size_type;
71 static const int size_value = 0;
72 };
73
74 template <int> struct vector_chooser;
75
76 template <>
77 struct vector_chooser<0>
78 {
79 template <typename Dummy = void>
80 struct apply
81 {
82 typedef vector0<> type;
83 };
84 };
85 }}
86
87
88 #define BOOST_PHOENIX_ITERATION_PARAMS \
89 (3, (1, BOOST_PP_INC(BOOST_PHOENIX_LIMIT), \
90 <boost/phoenix/support/vector.hpp>))
91 #include BOOST_PHOENIX_ITERATE()
92
93 #undef M0
94 #undef M1
95 #undef M2
96 #undef M3
97
98 #if defined(__WAVE__) && defined(BOOST_PHOENIX_CREATE_PREPROCESSED_FILES)
99 #pragma wave option(output: null)
100 #endif
101
102 #endif
103
104 #else
105
106 namespace boost { namespace phoenix
107 {
108 template <BOOST_PHOENIX_typename_A>
109 struct BOOST_PP_CAT(vector, BOOST_PHOENIX_ITERATION)
110 {
111 BOOST_PP_REPEAT(BOOST_PHOENIX_ITERATION, M0, _)
112
113 typedef mpl::int_<BOOST_PHOENIX_ITERATION> size_type;
114 static const int size_value = BOOST_PHOENIX_ITERATION;
115
116 typedef
117 BOOST_PP_CAT(vector, BOOST_PP_DEC(BOOST_PHOENIX_ITERATION))<BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_PHOENIX_ITERATION, A)>
118 args_type;
119
120 args_type args() const
121 {
122 args_type r = {BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_PHOENIX_ITERATION, a)};
123 return r;
124 }
125 };
126
127 template <>
128 struct vector_chooser<BOOST_PHOENIX_ITERATION>
129 {
130 template <BOOST_PHOENIX_typename_A>
131 struct apply
132 {
133 typedef BOOST_PP_CAT(vector, BOOST_PHOENIX_ITERATION)<BOOST_PHOENIX_A> type;
134 };
135 };
136 }}
137
138 #define BOOST_PHOENIX_SUPPORT_VECTOR_ADAT_PARAM0 \
139 BOOST_PP_REPEAT(BOOST_PHOENIX_ITERATION, M1, _) \
140 /**/
141 #define BOOST_PHOENIX_SUPPORT_VECTOR_ADAT_PARAM1 \
142 ( \
143 BOOST_PP_CAT( \
144 boost::phoenix::vector \
145 , BOOST_PHOENIX_ITERATION \
146 ) \
147 ) \
148 BOOST_PP_REPEAT(BOOST_PHOENIX_ITERATION, M1, _) \
149 /**/
150 #define BOOST_PHOENIX_SUPPORT_VECTOR_ADAT_PARAM2 \
151 BOOST_PP_REPEAT(BOOST_PHOENIX_ITERATION, M3, _) \
152 /**/
153
154 BOOST_FUSION_ADAPT_TPL_STRUCT_NO_PARTIAL(
155 BOOST_PHOENIX_SUPPORT_VECTOR_ADAT_PARAM0
156 , BOOST_PHOENIX_SUPPORT_VECTOR_ADAT_PARAM1
157 , BOOST_PHOENIX_SUPPORT_VECTOR_ADAT_PARAM2
158 )
159
160 #endif
161
162 #endif
163
164 #ifdef BOOST_MSVC
165 #pragma warning(pop)
166 #endif