]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/proto/context/detail/preprocessed/callable_eval.hpp
update sources to v12.2.3
[ceph.git] / ceph / src / boost / boost / proto / context / detail / preprocessed / callable_eval.hpp
1 ///////////////////////////////////////////////////////////////////////////////
2 /// \file callable_eval.hpp
3 /// Contains specializations of the callable_eval\<\> 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 namespace detail
9 {
10 template<typename Expr, typename Context>
11 struct is_expr_handled<Expr, Context, 1>
12 {
13 static callable_context_wrapper<Context> &sctx_;
14 static Expr &sexpr_;
15 static typename Expr::proto_tag &stag_;
16 static const bool value =
17 sizeof(yes_type) ==
18 sizeof(
19 detail::check_is_expr_handled(
20 (sctx_(
21 stag_
22 , proto::child_c< 0>( sexpr_)
23 ), 0)
24 )
25 );
26 typedef mpl::bool_<value> type;
27 };
28 }
29 namespace context
30 {
31
32
33
34
35
36
37
38
39
40
41
42
43 template<typename Expr, typename Context>
44 struct callable_eval<Expr, Context, 1>
45 {
46 typedef typename proto::result_of::child_c< Expr const &, 0>::type child0;
47 typedef
48 typename BOOST_PROTO_RESULT_OF<
49 Context(
50 typename Expr::proto_tag
51 , child0
52 )
53 >::type
54 result_type;
55
56
57
58 result_type operator ()(Expr &expr, Context &context) const
59 {
60 return context(
61 typename Expr::proto_tag()
62 , proto::child_c< 0>( expr)
63 );
64 }
65 };
66 }
67 namespace detail
68 {
69 template<typename Expr, typename Context>
70 struct is_expr_handled<Expr, Context, 2>
71 {
72 static callable_context_wrapper<Context> &sctx_;
73 static Expr &sexpr_;
74 static typename Expr::proto_tag &stag_;
75 static const bool value =
76 sizeof(yes_type) ==
77 sizeof(
78 detail::check_is_expr_handled(
79 (sctx_(
80 stag_
81 , proto::child_c< 0>( sexpr_) , proto::child_c< 1>( sexpr_)
82 ), 0)
83 )
84 );
85 typedef mpl::bool_<value> type;
86 };
87 }
88 namespace context
89 {
90
91
92
93
94
95
96
97
98
99
100
101
102 template<typename Expr, typename Context>
103 struct callable_eval<Expr, Context, 2>
104 {
105 typedef typename proto::result_of::child_c< Expr const &, 0>::type child0; typedef typename proto::result_of::child_c< Expr const &, 1>::type child1;
106 typedef
107 typename BOOST_PROTO_RESULT_OF<
108 Context(
109 typename Expr::proto_tag
110 , child0 , child1
111 )
112 >::type
113 result_type;
114
115
116
117 result_type operator ()(Expr &expr, Context &context) const
118 {
119 return context(
120 typename Expr::proto_tag()
121 , proto::child_c< 0>( expr) , proto::child_c< 1>( expr)
122 );
123 }
124 };
125 }
126 namespace detail
127 {
128 template<typename Expr, typename Context>
129 struct is_expr_handled<Expr, Context, 3>
130 {
131 static callable_context_wrapper<Context> &sctx_;
132 static Expr &sexpr_;
133 static typename Expr::proto_tag &stag_;
134 static const bool value =
135 sizeof(yes_type) ==
136 sizeof(
137 detail::check_is_expr_handled(
138 (sctx_(
139 stag_
140 , proto::child_c< 0>( sexpr_) , proto::child_c< 1>( sexpr_) , proto::child_c< 2>( sexpr_)
141 ), 0)
142 )
143 );
144 typedef mpl::bool_<value> type;
145 };
146 }
147 namespace context
148 {
149
150
151
152
153
154
155
156
157
158
159
160
161 template<typename Expr, typename Context>
162 struct callable_eval<Expr, Context, 3>
163 {
164 typedef typename proto::result_of::child_c< Expr const &, 0>::type child0; typedef typename proto::result_of::child_c< Expr const &, 1>::type child1; typedef typename proto::result_of::child_c< Expr const &, 2>::type child2;
165 typedef
166 typename BOOST_PROTO_RESULT_OF<
167 Context(
168 typename Expr::proto_tag
169 , child0 , child1 , child2
170 )
171 >::type
172 result_type;
173
174
175
176 result_type operator ()(Expr &expr, Context &context) const
177 {
178 return context(
179 typename Expr::proto_tag()
180 , proto::child_c< 0>( expr) , proto::child_c< 1>( expr) , proto::child_c< 2>( expr)
181 );
182 }
183 };
184 }
185 namespace detail
186 {
187 template<typename Expr, typename Context>
188 struct is_expr_handled<Expr, Context, 4>
189 {
190 static callable_context_wrapper<Context> &sctx_;
191 static Expr &sexpr_;
192 static typename Expr::proto_tag &stag_;
193 static const bool value =
194 sizeof(yes_type) ==
195 sizeof(
196 detail::check_is_expr_handled(
197 (sctx_(
198 stag_
199 , proto::child_c< 0>( sexpr_) , proto::child_c< 1>( sexpr_) , proto::child_c< 2>( sexpr_) , proto::child_c< 3>( sexpr_)
200 ), 0)
201 )
202 );
203 typedef mpl::bool_<value> type;
204 };
205 }
206 namespace context
207 {
208
209
210
211
212
213
214
215
216
217
218
219
220 template<typename Expr, typename Context>
221 struct callable_eval<Expr, Context, 4>
222 {
223 typedef typename proto::result_of::child_c< Expr const &, 0>::type child0; typedef typename proto::result_of::child_c< Expr const &, 1>::type child1; typedef typename proto::result_of::child_c< Expr const &, 2>::type child2; typedef typename proto::result_of::child_c< Expr const &, 3>::type child3;
224 typedef
225 typename BOOST_PROTO_RESULT_OF<
226 Context(
227 typename Expr::proto_tag
228 , child0 , child1 , child2 , child3
229 )
230 >::type
231 result_type;
232
233
234
235 result_type operator ()(Expr &expr, Context &context) const
236 {
237 return context(
238 typename Expr::proto_tag()
239 , proto::child_c< 0>( expr) , proto::child_c< 1>( expr) , proto::child_c< 2>( expr) , proto::child_c< 3>( expr)
240 );
241 }
242 };
243 }
244 namespace detail
245 {
246 template<typename Expr, typename Context>
247 struct is_expr_handled<Expr, Context, 5>
248 {
249 static callable_context_wrapper<Context> &sctx_;
250 static Expr &sexpr_;
251 static typename Expr::proto_tag &stag_;
252 static const bool value =
253 sizeof(yes_type) ==
254 sizeof(
255 detail::check_is_expr_handled(
256 (sctx_(
257 stag_
258 , proto::child_c< 0>( sexpr_) , proto::child_c< 1>( sexpr_) , proto::child_c< 2>( sexpr_) , proto::child_c< 3>( sexpr_) , proto::child_c< 4>( sexpr_)
259 ), 0)
260 )
261 );
262 typedef mpl::bool_<value> type;
263 };
264 }
265 namespace context
266 {
267
268
269
270
271
272
273
274
275
276
277
278
279 template<typename Expr, typename Context>
280 struct callable_eval<Expr, Context, 5>
281 {
282 typedef typename proto::result_of::child_c< Expr const &, 0>::type child0; typedef typename proto::result_of::child_c< Expr const &, 1>::type child1; typedef typename proto::result_of::child_c< Expr const &, 2>::type child2; typedef typename proto::result_of::child_c< Expr const &, 3>::type child3; typedef typename proto::result_of::child_c< Expr const &, 4>::type child4;
283 typedef
284 typename BOOST_PROTO_RESULT_OF<
285 Context(
286 typename Expr::proto_tag
287 , child0 , child1 , child2 , child3 , child4
288 )
289 >::type
290 result_type;
291
292
293
294 result_type operator ()(Expr &expr, Context &context) const
295 {
296 return context(
297 typename Expr::proto_tag()
298 , proto::child_c< 0>( expr) , proto::child_c< 1>( expr) , proto::child_c< 2>( expr) , proto::child_c< 3>( expr) , proto::child_c< 4>( expr)
299 );
300 }
301 };
302 }
303 namespace detail
304 {
305 template<typename Expr, typename Context>
306 struct is_expr_handled<Expr, Context, 6>
307 {
308 static callable_context_wrapper<Context> &sctx_;
309 static Expr &sexpr_;
310 static typename Expr::proto_tag &stag_;
311 static const bool value =
312 sizeof(yes_type) ==
313 sizeof(
314 detail::check_is_expr_handled(
315 (sctx_(
316 stag_
317 , proto::child_c< 0>( sexpr_) , proto::child_c< 1>( sexpr_) , proto::child_c< 2>( sexpr_) , proto::child_c< 3>( sexpr_) , proto::child_c< 4>( sexpr_) , proto::child_c< 5>( sexpr_)
318 ), 0)
319 )
320 );
321 typedef mpl::bool_<value> type;
322 };
323 }
324 namespace context
325 {
326
327
328
329
330
331
332
333
334
335
336
337
338 template<typename Expr, typename Context>
339 struct callable_eval<Expr, Context, 6>
340 {
341 typedef typename proto::result_of::child_c< Expr const &, 0>::type child0; typedef typename proto::result_of::child_c< Expr const &, 1>::type child1; typedef typename proto::result_of::child_c< Expr const &, 2>::type child2; typedef typename proto::result_of::child_c< Expr const &, 3>::type child3; typedef typename proto::result_of::child_c< Expr const &, 4>::type child4; typedef typename proto::result_of::child_c< Expr const &, 5>::type child5;
342 typedef
343 typename BOOST_PROTO_RESULT_OF<
344 Context(
345 typename Expr::proto_tag
346 , child0 , child1 , child2 , child3 , child4 , child5
347 )
348 >::type
349 result_type;
350
351
352
353 result_type operator ()(Expr &expr, Context &context) const
354 {
355 return context(
356 typename Expr::proto_tag()
357 , proto::child_c< 0>( expr) , proto::child_c< 1>( expr) , proto::child_c< 2>( expr) , proto::child_c< 3>( expr) , proto::child_c< 4>( expr) , proto::child_c< 5>( expr)
358 );
359 }
360 };
361 }
362 namespace detail
363 {
364 template<typename Expr, typename Context>
365 struct is_expr_handled<Expr, Context, 7>
366 {
367 static callable_context_wrapper<Context> &sctx_;
368 static Expr &sexpr_;
369 static typename Expr::proto_tag &stag_;
370 static const bool value =
371 sizeof(yes_type) ==
372 sizeof(
373 detail::check_is_expr_handled(
374 (sctx_(
375 stag_
376 , proto::child_c< 0>( sexpr_) , proto::child_c< 1>( sexpr_) , proto::child_c< 2>( sexpr_) , proto::child_c< 3>( sexpr_) , proto::child_c< 4>( sexpr_) , proto::child_c< 5>( sexpr_) , proto::child_c< 6>( sexpr_)
377 ), 0)
378 )
379 );
380 typedef mpl::bool_<value> type;
381 };
382 }
383 namespace context
384 {
385
386
387
388
389
390
391
392
393
394
395
396
397 template<typename Expr, typename Context>
398 struct callable_eval<Expr, Context, 7>
399 {
400 typedef typename proto::result_of::child_c< Expr const &, 0>::type child0; typedef typename proto::result_of::child_c< Expr const &, 1>::type child1; typedef typename proto::result_of::child_c< Expr const &, 2>::type child2; typedef typename proto::result_of::child_c< Expr const &, 3>::type child3; typedef typename proto::result_of::child_c< Expr const &, 4>::type child4; typedef typename proto::result_of::child_c< Expr const &, 5>::type child5; typedef typename proto::result_of::child_c< Expr const &, 6>::type child6;
401 typedef
402 typename BOOST_PROTO_RESULT_OF<
403 Context(
404 typename Expr::proto_tag
405 , child0 , child1 , child2 , child3 , child4 , child5 , child6
406 )
407 >::type
408 result_type;
409
410
411
412 result_type operator ()(Expr &expr, Context &context) const
413 {
414 return context(
415 typename Expr::proto_tag()
416 , proto::child_c< 0>( expr) , proto::child_c< 1>( expr) , proto::child_c< 2>( expr) , proto::child_c< 3>( expr) , proto::child_c< 4>( expr) , proto::child_c< 5>( expr) , proto::child_c< 6>( expr)
417 );
418 }
419 };
420 }
421 namespace detail
422 {
423 template<typename Expr, typename Context>
424 struct is_expr_handled<Expr, Context, 8>
425 {
426 static callable_context_wrapper<Context> &sctx_;
427 static Expr &sexpr_;
428 static typename Expr::proto_tag &stag_;
429 static const bool value =
430 sizeof(yes_type) ==
431 sizeof(
432 detail::check_is_expr_handled(
433 (sctx_(
434 stag_
435 , proto::child_c< 0>( sexpr_) , proto::child_c< 1>( sexpr_) , proto::child_c< 2>( sexpr_) , proto::child_c< 3>( sexpr_) , proto::child_c< 4>( sexpr_) , proto::child_c< 5>( sexpr_) , proto::child_c< 6>( sexpr_) , proto::child_c< 7>( sexpr_)
436 ), 0)
437 )
438 );
439 typedef mpl::bool_<value> type;
440 };
441 }
442 namespace context
443 {
444
445
446
447
448
449
450
451
452
453
454
455
456 template<typename Expr, typename Context>
457 struct callable_eval<Expr, Context, 8>
458 {
459 typedef typename proto::result_of::child_c< Expr const &, 0>::type child0; typedef typename proto::result_of::child_c< Expr const &, 1>::type child1; typedef typename proto::result_of::child_c< Expr const &, 2>::type child2; typedef typename proto::result_of::child_c< Expr const &, 3>::type child3; typedef typename proto::result_of::child_c< Expr const &, 4>::type child4; typedef typename proto::result_of::child_c< Expr const &, 5>::type child5; typedef typename proto::result_of::child_c< Expr const &, 6>::type child6; typedef typename proto::result_of::child_c< Expr const &, 7>::type child7;
460 typedef
461 typename BOOST_PROTO_RESULT_OF<
462 Context(
463 typename Expr::proto_tag
464 , child0 , child1 , child2 , child3 , child4 , child5 , child6 , child7
465 )
466 >::type
467 result_type;
468
469
470
471 result_type operator ()(Expr &expr, Context &context) const
472 {
473 return context(
474 typename Expr::proto_tag()
475 , proto::child_c< 0>( expr) , proto::child_c< 1>( expr) , proto::child_c< 2>( expr) , proto::child_c< 3>( expr) , proto::child_c< 4>( expr) , proto::child_c< 5>( expr) , proto::child_c< 6>( expr) , proto::child_c< 7>( expr)
476 );
477 }
478 };
479 }
480 namespace detail
481 {
482 template<typename Expr, typename Context>
483 struct is_expr_handled<Expr, Context, 9>
484 {
485 static callable_context_wrapper<Context> &sctx_;
486 static Expr &sexpr_;
487 static typename Expr::proto_tag &stag_;
488 static const bool value =
489 sizeof(yes_type) ==
490 sizeof(
491 detail::check_is_expr_handled(
492 (sctx_(
493 stag_
494 , proto::child_c< 0>( sexpr_) , proto::child_c< 1>( sexpr_) , proto::child_c< 2>( sexpr_) , proto::child_c< 3>( sexpr_) , proto::child_c< 4>( sexpr_) , proto::child_c< 5>( sexpr_) , proto::child_c< 6>( sexpr_) , proto::child_c< 7>( sexpr_) , proto::child_c< 8>( sexpr_)
495 ), 0)
496 )
497 );
498 typedef mpl::bool_<value> type;
499 };
500 }
501 namespace context
502 {
503
504
505
506
507
508
509
510
511
512
513
514
515 template<typename Expr, typename Context>
516 struct callable_eval<Expr, Context, 9>
517 {
518 typedef typename proto::result_of::child_c< Expr const &, 0>::type child0; typedef typename proto::result_of::child_c< Expr const &, 1>::type child1; typedef typename proto::result_of::child_c< Expr const &, 2>::type child2; typedef typename proto::result_of::child_c< Expr const &, 3>::type child3; typedef typename proto::result_of::child_c< Expr const &, 4>::type child4; typedef typename proto::result_of::child_c< Expr const &, 5>::type child5; typedef typename proto::result_of::child_c< Expr const &, 6>::type child6; typedef typename proto::result_of::child_c< Expr const &, 7>::type child7; typedef typename proto::result_of::child_c< Expr const &, 8>::type child8;
519 typedef
520 typename BOOST_PROTO_RESULT_OF<
521 Context(
522 typename Expr::proto_tag
523 , child0 , child1 , child2 , child3 , child4 , child5 , child6 , child7 , child8
524 )
525 >::type
526 result_type;
527
528
529
530 result_type operator ()(Expr &expr, Context &context) const
531 {
532 return context(
533 typename Expr::proto_tag()
534 , proto::child_c< 0>( expr) , proto::child_c< 1>( expr) , proto::child_c< 2>( expr) , proto::child_c< 3>( expr) , proto::child_c< 4>( expr) , proto::child_c< 5>( expr) , proto::child_c< 6>( expr) , proto::child_c< 7>( expr) , proto::child_c< 8>( expr)
535 );
536 }
537 };
538 }
539 namespace detail
540 {
541 template<typename Expr, typename Context>
542 struct is_expr_handled<Expr, Context, 10>
543 {
544 static callable_context_wrapper<Context> &sctx_;
545 static Expr &sexpr_;
546 static typename Expr::proto_tag &stag_;
547 static const bool value =
548 sizeof(yes_type) ==
549 sizeof(
550 detail::check_is_expr_handled(
551 (sctx_(
552 stag_
553 , proto::child_c< 0>( sexpr_) , proto::child_c< 1>( sexpr_) , proto::child_c< 2>( sexpr_) , proto::child_c< 3>( sexpr_) , proto::child_c< 4>( sexpr_) , proto::child_c< 5>( sexpr_) , proto::child_c< 6>( sexpr_) , proto::child_c< 7>( sexpr_) , proto::child_c< 8>( sexpr_) , proto::child_c< 9>( sexpr_)
554 ), 0)
555 )
556 );
557 typedef mpl::bool_<value> type;
558 };
559 }
560 namespace context
561 {
562
563
564
565
566
567
568
569
570
571
572
573
574 template<typename Expr, typename Context>
575 struct callable_eval<Expr, Context, 10>
576 {
577 typedef typename proto::result_of::child_c< Expr const &, 0>::type child0; typedef typename proto::result_of::child_c< Expr const &, 1>::type child1; typedef typename proto::result_of::child_c< Expr const &, 2>::type child2; typedef typename proto::result_of::child_c< Expr const &, 3>::type child3; typedef typename proto::result_of::child_c< Expr const &, 4>::type child4; typedef typename proto::result_of::child_c< Expr const &, 5>::type child5; typedef typename proto::result_of::child_c< Expr const &, 6>::type child6; typedef typename proto::result_of::child_c< Expr const &, 7>::type child7; typedef typename proto::result_of::child_c< Expr const &, 8>::type child8; typedef typename proto::result_of::child_c< Expr const &, 9>::type child9;
578 typedef
579 typename BOOST_PROTO_RESULT_OF<
580 Context(
581 typename Expr::proto_tag
582 , child0 , child1 , child2 , child3 , child4 , child5 , child6 , child7 , child8 , child9
583 )
584 >::type
585 result_type;
586
587
588
589 result_type operator ()(Expr &expr, Context &context) const
590 {
591 return context(
592 typename Expr::proto_tag()
593 , proto::child_c< 0>( expr) , proto::child_c< 1>( expr) , proto::child_c< 2>( expr) , proto::child_c< 3>( expr) , proto::child_c< 4>( expr) , proto::child_c< 5>( expr) , proto::child_c< 6>( expr) , proto::child_c< 7>( expr) , proto::child_c< 8>( expr) , proto::child_c< 9>( expr)
594 );
595 }
596 };
597 }