]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/proto/include/boost/proto/detail/preprocessed/funop.hpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / proto / include / boost / proto / detail / preprocessed / funop.hpp
1 ///////////////////////////////////////////////////////////////////////////////
2 // funop.hpp
3 // Contains definition of funop[n]\<\> class template.
4 //
5 // Copyright 2008 Eric Niebler. Distributed under the Boost
6 // Software License, Version 1.0. (See accompanying file
7 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8
9
10 template<typename Expr, typename Domain >
11 struct funop0
12 {
13 typedef typename proto::base_expr<
14 Domain
15 , tag::function
16 , list1<
17 Expr &
18
19 >
20 >::type type;
21 BOOST_FORCEINLINE
22 static type const call(
23 Expr &e
24
25 )
26 {
27 type that = {
28 e
29
30 };
31 return that;
32 }
33 };
34
35
36 template<typename Expr , typename This, typename Domain>
37 struct funop<Expr(), This, Domain>
38 : funop0<
39 typename detail::same_cv<Expr, This>::type
40 , Domain
41
42 >
43 {};
44
45
46 template<typename Expr, typename Domain , typename A0>
47 struct funop1
48 {
49 typedef typename proto::base_expr<
50 Domain
51 , tag::function
52 , list2<
53 Expr &
54 , typename proto::result_of::as_child<A0, Domain>::type
55 >
56 >::type type;
57 BOOST_FORCEINLINE
58 static type const call(
59 Expr &e
60 , A0 &a0
61 )
62 {
63 type that = {
64 e
65 , proto::as_child<Domain>(a0)
66 };
67 return that;
68 }
69 };
70
71
72 template<typename Expr , typename A0, typename This, typename Domain>
73 struct funop<Expr(A0), This, Domain>
74 : funop1<
75 typename detail::same_cv<Expr, This>::type
76 , Domain
77 , typename remove_reference<A0 >::type
78 >
79 {};
80
81
82 template<typename Expr, typename Domain , typename A0 , typename A1>
83 struct funop2
84 {
85 typedef typename proto::base_expr<
86 Domain
87 , tag::function
88 , list3<
89 Expr &
90 , typename proto::result_of::as_child<A0, Domain>::type , typename proto::result_of::as_child<A1, Domain>::type
91 >
92 >::type type;
93 BOOST_FORCEINLINE
94 static type const call(
95 Expr &e
96 , A0 &a0 , A1 &a1
97 )
98 {
99 type that = {
100 e
101 , proto::as_child<Domain>(a0) , proto::as_child<Domain>(a1)
102 };
103 return that;
104 }
105 };
106
107
108 template<typename Expr , typename A0 , typename A1, typename This, typename Domain>
109 struct funop<Expr(A0 , A1), This, Domain>
110 : funop2<
111 typename detail::same_cv<Expr, This>::type
112 , Domain
113 , typename remove_reference<A0 >::type , typename remove_reference<A1 >::type
114 >
115 {};
116
117
118 template<typename Expr, typename Domain , typename A0 , typename A1 , typename A2>
119 struct funop3
120 {
121 typedef typename proto::base_expr<
122 Domain
123 , tag::function
124 , list4<
125 Expr &
126 , typename proto::result_of::as_child<A0, Domain>::type , typename proto::result_of::as_child<A1, Domain>::type , typename proto::result_of::as_child<A2, Domain>::type
127 >
128 >::type type;
129 BOOST_FORCEINLINE
130 static type const call(
131 Expr &e
132 , A0 &a0 , A1 &a1 , A2 &a2
133 )
134 {
135 type that = {
136 e
137 , proto::as_child<Domain>(a0) , proto::as_child<Domain>(a1) , proto::as_child<Domain>(a2)
138 };
139 return that;
140 }
141 };
142
143
144 template<typename Expr , typename A0 , typename A1 , typename A2, typename This, typename Domain>
145 struct funop<Expr(A0 , A1 , A2), This, Domain>
146 : funop3<
147 typename detail::same_cv<Expr, This>::type
148 , Domain
149 , typename remove_reference<A0 >::type , typename remove_reference<A1 >::type , typename remove_reference<A2 >::type
150 >
151 {};
152
153
154 template<typename Expr, typename Domain , typename A0 , typename A1 , typename A2 , typename A3>
155 struct funop4
156 {
157 typedef typename proto::base_expr<
158 Domain
159 , tag::function
160 , list5<
161 Expr &
162 , typename proto::result_of::as_child<A0, Domain>::type , typename proto::result_of::as_child<A1, Domain>::type , typename proto::result_of::as_child<A2, Domain>::type , typename proto::result_of::as_child<A3, Domain>::type
163 >
164 >::type type;
165 BOOST_FORCEINLINE
166 static type const call(
167 Expr &e
168 , A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3
169 )
170 {
171 type that = {
172 e
173 , proto::as_child<Domain>(a0) , proto::as_child<Domain>(a1) , proto::as_child<Domain>(a2) , proto::as_child<Domain>(a3)
174 };
175 return that;
176 }
177 };
178
179
180 template<typename Expr , typename A0 , typename A1 , typename A2 , typename A3, typename This, typename Domain>
181 struct funop<Expr(A0 , A1 , A2 , A3), This, Domain>
182 : funop4<
183 typename detail::same_cv<Expr, This>::type
184 , Domain
185 , typename remove_reference<A0 >::type , typename remove_reference<A1 >::type , typename remove_reference<A2 >::type , typename remove_reference<A3 >::type
186 >
187 {};
188
189
190 template<typename Expr, typename Domain , typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
191 struct funop5
192 {
193 typedef typename proto::base_expr<
194 Domain
195 , tag::function
196 , list6<
197 Expr &
198 , typename proto::result_of::as_child<A0, Domain>::type , typename proto::result_of::as_child<A1, Domain>::type , typename proto::result_of::as_child<A2, Domain>::type , typename proto::result_of::as_child<A3, Domain>::type , typename proto::result_of::as_child<A4, Domain>::type
199 >
200 >::type type;
201 BOOST_FORCEINLINE
202 static type const call(
203 Expr &e
204 , A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4
205 )
206 {
207 type that = {
208 e
209 , proto::as_child<Domain>(a0) , proto::as_child<Domain>(a1) , proto::as_child<Domain>(a2) , proto::as_child<Domain>(a3) , proto::as_child<Domain>(a4)
210 };
211 return that;
212 }
213 };
214
215
216 template<typename Expr , typename A0 , typename A1 , typename A2 , typename A3 , typename A4, typename This, typename Domain>
217 struct funop<Expr(A0 , A1 , A2 , A3 , A4), This, Domain>
218 : funop5<
219 typename detail::same_cv<Expr, This>::type
220 , Domain
221 , typename remove_reference<A0 >::type , typename remove_reference<A1 >::type , typename remove_reference<A2 >::type , typename remove_reference<A3 >::type , typename remove_reference<A4 >::type
222 >
223 {};
224
225
226 template<typename Expr, typename Domain , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
227 struct funop6
228 {
229 typedef typename proto::base_expr<
230 Domain
231 , tag::function
232 , list7<
233 Expr &
234 , typename proto::result_of::as_child<A0, Domain>::type , typename proto::result_of::as_child<A1, Domain>::type , typename proto::result_of::as_child<A2, Domain>::type , typename proto::result_of::as_child<A3, Domain>::type , typename proto::result_of::as_child<A4, Domain>::type , typename proto::result_of::as_child<A5, Domain>::type
235 >
236 >::type type;
237 BOOST_FORCEINLINE
238 static type const call(
239 Expr &e
240 , A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4 , A5 &a5
241 )
242 {
243 type that = {
244 e
245 , proto::as_child<Domain>(a0) , proto::as_child<Domain>(a1) , proto::as_child<Domain>(a2) , proto::as_child<Domain>(a3) , proto::as_child<Domain>(a4) , proto::as_child<Domain>(a5)
246 };
247 return that;
248 }
249 };
250
251
252 template<typename Expr , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5, typename This, typename Domain>
253 struct funop<Expr(A0 , A1 , A2 , A3 , A4 , A5), This, Domain>
254 : funop6<
255 typename detail::same_cv<Expr, This>::type
256 , Domain
257 , typename remove_reference<A0 >::type , typename remove_reference<A1 >::type , typename remove_reference<A2 >::type , typename remove_reference<A3 >::type , typename remove_reference<A4 >::type , typename remove_reference<A5 >::type
258 >
259 {};
260
261
262 template<typename Expr, typename Domain , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
263 struct funop7
264 {
265 typedef typename proto::base_expr<
266 Domain
267 , tag::function
268 , list8<
269 Expr &
270 , typename proto::result_of::as_child<A0, Domain>::type , typename proto::result_of::as_child<A1, Domain>::type , typename proto::result_of::as_child<A2, Domain>::type , typename proto::result_of::as_child<A3, Domain>::type , typename proto::result_of::as_child<A4, Domain>::type , typename proto::result_of::as_child<A5, Domain>::type , typename proto::result_of::as_child<A6, Domain>::type
271 >
272 >::type type;
273 BOOST_FORCEINLINE
274 static type const call(
275 Expr &e
276 , A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4 , A5 &a5 , A6 &a6
277 )
278 {
279 type that = {
280 e
281 , proto::as_child<Domain>(a0) , proto::as_child<Domain>(a1) , proto::as_child<Domain>(a2) , proto::as_child<Domain>(a3) , proto::as_child<Domain>(a4) , proto::as_child<Domain>(a5) , proto::as_child<Domain>(a6)
282 };
283 return that;
284 }
285 };
286
287
288 template<typename Expr , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6, typename This, typename Domain>
289 struct funop<Expr(A0 , A1 , A2 , A3 , A4 , A5 , A6), This, Domain>
290 : funop7<
291 typename detail::same_cv<Expr, This>::type
292 , Domain
293 , typename remove_reference<A0 >::type , typename remove_reference<A1 >::type , typename remove_reference<A2 >::type , typename remove_reference<A3 >::type , typename remove_reference<A4 >::type , typename remove_reference<A5 >::type , typename remove_reference<A6 >::type
294 >
295 {};
296
297
298 template<typename Expr, typename Domain , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
299 struct funop8
300 {
301 typedef typename proto::base_expr<
302 Domain
303 , tag::function
304 , list9<
305 Expr &
306 , typename proto::result_of::as_child<A0, Domain>::type , typename proto::result_of::as_child<A1, Domain>::type , typename proto::result_of::as_child<A2, Domain>::type , typename proto::result_of::as_child<A3, Domain>::type , typename proto::result_of::as_child<A4, Domain>::type , typename proto::result_of::as_child<A5, Domain>::type , typename proto::result_of::as_child<A6, Domain>::type , typename proto::result_of::as_child<A7, Domain>::type
307 >
308 >::type type;
309 BOOST_FORCEINLINE
310 static type const call(
311 Expr &e
312 , A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4 , A5 &a5 , A6 &a6 , A7 &a7
313 )
314 {
315 type that = {
316 e
317 , proto::as_child<Domain>(a0) , proto::as_child<Domain>(a1) , proto::as_child<Domain>(a2) , proto::as_child<Domain>(a3) , proto::as_child<Domain>(a4) , proto::as_child<Domain>(a5) , proto::as_child<Domain>(a6) , proto::as_child<Domain>(a7)
318 };
319 return that;
320 }
321 };
322
323
324 template<typename Expr , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7, typename This, typename Domain>
325 struct funop<Expr(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7), This, Domain>
326 : funop8<
327 typename detail::same_cv<Expr, This>::type
328 , Domain
329 , typename remove_reference<A0 >::type , typename remove_reference<A1 >::type , typename remove_reference<A2 >::type , typename remove_reference<A3 >::type , typename remove_reference<A4 >::type , typename remove_reference<A5 >::type , typename remove_reference<A6 >::type , typename remove_reference<A7 >::type
330 >
331 {};
332
333
334 template<typename Expr, typename Domain , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
335 struct funop9
336 {
337 typedef typename proto::base_expr<
338 Domain
339 , tag::function
340 , list10<
341 Expr &
342 , typename proto::result_of::as_child<A0, Domain>::type , typename proto::result_of::as_child<A1, Domain>::type , typename proto::result_of::as_child<A2, Domain>::type , typename proto::result_of::as_child<A3, Domain>::type , typename proto::result_of::as_child<A4, Domain>::type , typename proto::result_of::as_child<A5, Domain>::type , typename proto::result_of::as_child<A6, Domain>::type , typename proto::result_of::as_child<A7, Domain>::type , typename proto::result_of::as_child<A8, Domain>::type
343 >
344 >::type type;
345 BOOST_FORCEINLINE
346 static type const call(
347 Expr &e
348 , A0 &a0 , A1 &a1 , A2 &a2 , A3 &a3 , A4 &a4 , A5 &a5 , A6 &a6 , A7 &a7 , A8 &a8
349 )
350 {
351 type that = {
352 e
353 , proto::as_child<Domain>(a0) , proto::as_child<Domain>(a1) , proto::as_child<Domain>(a2) , proto::as_child<Domain>(a3) , proto::as_child<Domain>(a4) , proto::as_child<Domain>(a5) , proto::as_child<Domain>(a6) , proto::as_child<Domain>(a7) , proto::as_child<Domain>(a8)
354 };
355 return that;
356 }
357 };
358
359
360 template<typename Expr , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8, typename This, typename Domain>
361 struct funop<Expr(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8), This, Domain>
362 : funop9<
363 typename detail::same_cv<Expr, This>::type
364 , Domain
365 , typename remove_reference<A0 >::type , typename remove_reference<A1 >::type , typename remove_reference<A2 >::type , typename remove_reference<A3 >::type , typename remove_reference<A4 >::type , typename remove_reference<A5 >::type , typename remove_reference<A6 >::type , typename remove_reference<A7 >::type , typename remove_reference<A8 >::type
366 >
367 {};