annotate DEPENDENCIES/generic/include/boost/proto/detail/preprocessed/traits.hpp @ 133:4acb5d8d80b6 tip

Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author Chris Cannam
date Tue, 30 Jul 2019 12:25:44 +0100
parents 2665513ce2d3
children
rev   line source
Chris@16 1 ///////////////////////////////////////////////////////////////////////////////
Chris@16 2 /// \file traits.hpp
Chris@16 3 /// Definitions of proto::function, proto::nary_expr and proto::result_of::child_c
Chris@16 4 //
Chris@16 5 // Copyright 2008 Eric Niebler. Distributed under the Boost
Chris@16 6 // Software License, Version 1.0. (See accompanying file
Chris@16 7 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Chris@16 8 namespace result_of
Chris@16 9 {
Chris@16 10
Chris@16 11
Chris@16 12
Chris@16 13
Chris@16 14
Chris@16 15
Chris@16 16 template<typename Expr>
Chris@16 17 struct child_c<Expr, 0>
Chris@16 18 {
Chris@16 19
Chris@16 20 BOOST_STATIC_ASSERT(0 != Expr::proto_arity_c);
Chris@16 21
Chris@16 22
Chris@16 23 typedef typename Expr::proto_child0 value_type;
Chris@16 24
Chris@16 25
Chris@16 26
Chris@16 27
Chris@16 28
Chris@16 29 typedef typename detail::expr_traits<typename Expr::proto_child0>::value_type type;
Chris@16 30 };
Chris@16 31 template<typename Expr>
Chris@16 32 struct child_c<Expr &, 0>
Chris@16 33 {
Chris@16 34
Chris@16 35 BOOST_STATIC_ASSERT(0 != Expr::proto_arity_c);
Chris@16 36
Chris@16 37
Chris@16 38 typedef typename Expr::proto_child0 value_type;
Chris@16 39
Chris@16 40
Chris@16 41
Chris@16 42
Chris@16 43
Chris@16 44 typedef typename detail::expr_traits<typename Expr::proto_child0>::reference type;
Chris@16 45
Chris@16 46
Chris@16 47 BOOST_FORCEINLINE
Chris@16 48 static type call(Expr &e)
Chris@16 49 {
Chris@16 50 return e.proto_base().child0;
Chris@16 51 }
Chris@16 52 };
Chris@16 53 template<typename Expr>
Chris@16 54 struct child_c<Expr const &, 0>
Chris@16 55 {
Chris@16 56
Chris@16 57 BOOST_STATIC_ASSERT(0 != Expr::proto_arity_c);
Chris@16 58
Chris@16 59
Chris@16 60 typedef typename Expr::proto_child0 value_type;
Chris@16 61
Chris@16 62
Chris@16 63
Chris@16 64
Chris@16 65
Chris@16 66 typedef typename detail::expr_traits<typename Expr::proto_child0>::const_reference type;
Chris@16 67
Chris@16 68
Chris@16 69 BOOST_FORCEINLINE
Chris@16 70 static type call(Expr const &e)
Chris@16 71 {
Chris@16 72 return e.proto_base().child0;
Chris@16 73 }
Chris@16 74 };
Chris@16 75 }
Chris@16 76
Chris@16 77
Chris@16 78
Chris@16 79
Chris@16 80 template<typename A0>
Chris@16 81 struct function
Chris@16 82 <
Chris@16 83 A0
Chris@16 84 , void , void , void , void , void , void , void , void , void
Chris@16 85 >
Chris@16 86 : proto::transform<
Chris@16 87 function<
Chris@16 88 A0
Chris@16 89 , void , void , void , void , void , void , void , void , void
Chris@16 90 >
Chris@16 91 , int
Chris@16 92 >
Chris@16 93 {
Chris@16 94 typedef proto::expr<proto::tag::function, list1<A0>, 1> type;
Chris@16 95 typedef proto::basic_expr<proto::tag::function, list1<A0>, 1> proto_grammar;
Chris@16 96 template<typename Expr, typename State, typename Data>
Chris@16 97 struct impl
Chris@16 98 : detail::pass_through_impl<function, deduce_domain, Expr, State, Data>
Chris@16 99 {};
Chris@16 100
Chris@16 101 typedef proto::tag::function proto_tag;
Chris@16 102 typedef A0 proto_child0;
Chris@16 103 typedef detail::if_vararg<A0> proto_child1; typedef detail::if_vararg<A0> proto_child2; typedef detail::if_vararg<A0> proto_child3; typedef detail::if_vararg<A0> proto_child4; typedef detail::if_vararg<A0> proto_child5; typedef detail::if_vararg<A0> proto_child6; typedef detail::if_vararg<A0> proto_child7; typedef detail::if_vararg<A0> proto_child8; typedef detail::if_vararg<A0> proto_child9;
Chris@16 104 };
Chris@16 105
Chris@16 106
Chris@16 107
Chris@16 108
Chris@16 109
Chris@16 110
Chris@16 111
Chris@16 112
Chris@16 113 template<typename Tag , typename A0>
Chris@16 114 struct nary_expr
Chris@16 115 <
Chris@16 116 Tag
Chris@16 117 , A0
Chris@16 118 , void , void , void , void , void , void , void , void , void
Chris@16 119 >
Chris@16 120 : proto::transform<
Chris@16 121 nary_expr<
Chris@16 122 Tag
Chris@16 123 , A0
Chris@16 124 , void , void , void , void , void , void , void , void , void
Chris@16 125 >
Chris@16 126 , int
Chris@16 127 >
Chris@16 128 {
Chris@16 129 typedef proto::expr<Tag, list1<A0>, 1> type;
Chris@16 130 typedef proto::basic_expr<Tag, list1<A0>, 1> proto_grammar;
Chris@16 131 template<typename Expr, typename State, typename Data>
Chris@16 132 struct impl
Chris@16 133 : detail::pass_through_impl<nary_expr, deduce_domain, Expr, State, Data>
Chris@16 134 {};
Chris@16 135
Chris@16 136 typedef Tag proto_tag;
Chris@16 137 typedef A0 proto_child0;
Chris@16 138 typedef detail::if_vararg<A0> proto_child1; typedef detail::if_vararg<A0> proto_child2; typedef detail::if_vararg<A0> proto_child3; typedef detail::if_vararg<A0> proto_child4; typedef detail::if_vararg<A0> proto_child5; typedef detail::if_vararg<A0> proto_child6; typedef detail::if_vararg<A0> proto_child7; typedef detail::if_vararg<A0> proto_child8; typedef detail::if_vararg<A0> proto_child9;
Chris@16 139 };
Chris@16 140 namespace detail
Chris@16 141 {
Chris@16 142 template<
Chris@16 143 template<typename> class T
Chris@16 144 , typename A0
Chris@16 145 >
Chris@16 146 struct is_callable_<T<A0> BOOST_PROTO_TEMPLATE_ARITY_PARAM(1)>
Chris@16 147 : is_same<A0, callable>
Chris@16 148 {};
Chris@16 149 }
Chris@16 150 namespace result_of
Chris@16 151 {
Chris@16 152
Chris@16 153
Chris@16 154
Chris@16 155
Chris@16 156
Chris@16 157
Chris@16 158 template<typename Expr>
Chris@16 159 struct child_c<Expr, 1>
Chris@16 160 {
Chris@16 161
Chris@16 162 BOOST_STATIC_ASSERT(0 != Expr::proto_arity_c);
Chris@16 163
Chris@16 164
Chris@16 165 typedef typename Expr::proto_child1 value_type;
Chris@16 166
Chris@16 167
Chris@16 168
Chris@16 169
Chris@16 170
Chris@16 171 typedef typename detail::expr_traits<typename Expr::proto_child1>::value_type type;
Chris@16 172 };
Chris@16 173 template<typename Expr>
Chris@16 174 struct child_c<Expr &, 1>
Chris@16 175 {
Chris@16 176
Chris@16 177 BOOST_STATIC_ASSERT(0 != Expr::proto_arity_c);
Chris@16 178
Chris@16 179
Chris@16 180 typedef typename Expr::proto_child1 value_type;
Chris@16 181
Chris@16 182
Chris@16 183
Chris@16 184
Chris@16 185
Chris@16 186 typedef typename detail::expr_traits<typename Expr::proto_child1>::reference type;
Chris@16 187
Chris@16 188
Chris@16 189 BOOST_FORCEINLINE
Chris@16 190 static type call(Expr &e)
Chris@16 191 {
Chris@16 192 return e.proto_base().child1;
Chris@16 193 }
Chris@16 194 };
Chris@16 195 template<typename Expr>
Chris@16 196 struct child_c<Expr const &, 1>
Chris@16 197 {
Chris@16 198
Chris@16 199 BOOST_STATIC_ASSERT(0 != Expr::proto_arity_c);
Chris@16 200
Chris@16 201
Chris@16 202 typedef typename Expr::proto_child1 value_type;
Chris@16 203
Chris@16 204
Chris@16 205
Chris@16 206
Chris@16 207
Chris@16 208 typedef typename detail::expr_traits<typename Expr::proto_child1>::const_reference type;
Chris@16 209
Chris@16 210
Chris@16 211 BOOST_FORCEINLINE
Chris@16 212 static type call(Expr const &e)
Chris@16 213 {
Chris@16 214 return e.proto_base().child1;
Chris@16 215 }
Chris@16 216 };
Chris@16 217 }
Chris@16 218
Chris@16 219
Chris@16 220
Chris@16 221
Chris@16 222 template<typename A0 , typename A1>
Chris@16 223 struct function
Chris@16 224 <
Chris@16 225 A0 , A1
Chris@16 226 , void , void , void , void , void , void , void , void
Chris@16 227 >
Chris@16 228 : proto::transform<
Chris@16 229 function<
Chris@16 230 A0 , A1
Chris@16 231 , void , void , void , void , void , void , void , void
Chris@16 232 >
Chris@16 233 , int
Chris@16 234 >
Chris@16 235 {
Chris@16 236 typedef proto::expr<proto::tag::function, list2<A0 , A1>, 2> type;
Chris@16 237 typedef proto::basic_expr<proto::tag::function, list2<A0 , A1>, 2> proto_grammar;
Chris@16 238 template<typename Expr, typename State, typename Data>
Chris@16 239 struct impl
Chris@16 240 : detail::pass_through_impl<function, deduce_domain, Expr, State, Data>
Chris@16 241 {};
Chris@16 242
Chris@16 243 typedef proto::tag::function proto_tag;
Chris@16 244 typedef A0 proto_child0; typedef A1 proto_child1;
Chris@16 245 typedef detail::if_vararg<A1> proto_child2; typedef detail::if_vararg<A1> proto_child3; typedef detail::if_vararg<A1> proto_child4; typedef detail::if_vararg<A1> proto_child5; typedef detail::if_vararg<A1> proto_child6; typedef detail::if_vararg<A1> proto_child7; typedef detail::if_vararg<A1> proto_child8; typedef detail::if_vararg<A1> proto_child9;
Chris@16 246 };
Chris@16 247
Chris@16 248
Chris@16 249
Chris@16 250
Chris@16 251
Chris@16 252
Chris@16 253
Chris@16 254
Chris@16 255 template<typename Tag , typename A0 , typename A1>
Chris@16 256 struct nary_expr
Chris@16 257 <
Chris@16 258 Tag
Chris@16 259 , A0 , A1
Chris@16 260 , void , void , void , void , void , void , void , void
Chris@16 261 >
Chris@16 262 : proto::transform<
Chris@16 263 nary_expr<
Chris@16 264 Tag
Chris@16 265 , A0 , A1
Chris@16 266 , void , void , void , void , void , void , void , void
Chris@16 267 >
Chris@16 268 , int
Chris@16 269 >
Chris@16 270 {
Chris@16 271 typedef proto::expr<Tag, list2<A0 , A1>, 2> type;
Chris@16 272 typedef proto::basic_expr<Tag, list2<A0 , A1>, 2> proto_grammar;
Chris@16 273 template<typename Expr, typename State, typename Data>
Chris@16 274 struct impl
Chris@16 275 : detail::pass_through_impl<nary_expr, deduce_domain, Expr, State, Data>
Chris@16 276 {};
Chris@16 277
Chris@16 278 typedef Tag proto_tag;
Chris@16 279 typedef A0 proto_child0; typedef A1 proto_child1;
Chris@16 280 typedef detail::if_vararg<A1> proto_child2; typedef detail::if_vararg<A1> proto_child3; typedef detail::if_vararg<A1> proto_child4; typedef detail::if_vararg<A1> proto_child5; typedef detail::if_vararg<A1> proto_child6; typedef detail::if_vararg<A1> proto_child7; typedef detail::if_vararg<A1> proto_child8; typedef detail::if_vararg<A1> proto_child9;
Chris@16 281 };
Chris@16 282 namespace detail
Chris@16 283 {
Chris@16 284 template<
Chris@16 285 template<typename , typename> class T
Chris@16 286 , typename A0 , typename A1
Chris@16 287 >
Chris@16 288 struct is_callable_<T<A0 , A1> BOOST_PROTO_TEMPLATE_ARITY_PARAM(2)>
Chris@16 289 : is_same<A1, callable>
Chris@16 290 {};
Chris@16 291 }
Chris@16 292 namespace result_of
Chris@16 293 {
Chris@16 294
Chris@16 295
Chris@16 296
Chris@16 297
Chris@16 298
Chris@16 299
Chris@16 300 template<typename Expr>
Chris@16 301 struct child_c<Expr, 2>
Chris@16 302 {
Chris@16 303
Chris@16 304 BOOST_STATIC_ASSERT(0 != Expr::proto_arity_c);
Chris@16 305
Chris@16 306
Chris@16 307 typedef typename Expr::proto_child2 value_type;
Chris@16 308
Chris@16 309
Chris@16 310
Chris@16 311
Chris@16 312
Chris@16 313 typedef typename detail::expr_traits<typename Expr::proto_child2>::value_type type;
Chris@16 314 };
Chris@16 315 template<typename Expr>
Chris@16 316 struct child_c<Expr &, 2>
Chris@16 317 {
Chris@16 318
Chris@16 319 BOOST_STATIC_ASSERT(0 != Expr::proto_arity_c);
Chris@16 320
Chris@16 321
Chris@16 322 typedef typename Expr::proto_child2 value_type;
Chris@16 323
Chris@16 324
Chris@16 325
Chris@16 326
Chris@16 327
Chris@16 328 typedef typename detail::expr_traits<typename Expr::proto_child2>::reference type;
Chris@16 329
Chris@16 330
Chris@16 331 BOOST_FORCEINLINE
Chris@16 332 static type call(Expr &e)
Chris@16 333 {
Chris@16 334 return e.proto_base().child2;
Chris@16 335 }
Chris@16 336 };
Chris@16 337 template<typename Expr>
Chris@16 338 struct child_c<Expr const &, 2>
Chris@16 339 {
Chris@16 340
Chris@16 341 BOOST_STATIC_ASSERT(0 != Expr::proto_arity_c);
Chris@16 342
Chris@16 343
Chris@16 344 typedef typename Expr::proto_child2 value_type;
Chris@16 345
Chris@16 346
Chris@16 347
Chris@16 348
Chris@16 349
Chris@16 350 typedef typename detail::expr_traits<typename Expr::proto_child2>::const_reference type;
Chris@16 351
Chris@16 352
Chris@16 353 BOOST_FORCEINLINE
Chris@16 354 static type call(Expr const &e)
Chris@16 355 {
Chris@16 356 return e.proto_base().child2;
Chris@16 357 }
Chris@16 358 };
Chris@16 359 }
Chris@16 360
Chris@16 361
Chris@16 362
Chris@16 363
Chris@16 364 template<typename A0 , typename A1 , typename A2>
Chris@16 365 struct function
Chris@16 366 <
Chris@16 367 A0 , A1 , A2
Chris@16 368 , void , void , void , void , void , void , void
Chris@16 369 >
Chris@16 370 : proto::transform<
Chris@16 371 function<
Chris@16 372 A0 , A1 , A2
Chris@16 373 , void , void , void , void , void , void , void
Chris@16 374 >
Chris@16 375 , int
Chris@16 376 >
Chris@16 377 {
Chris@16 378 typedef proto::expr<proto::tag::function, list3<A0 , A1 , A2>, 3> type;
Chris@16 379 typedef proto::basic_expr<proto::tag::function, list3<A0 , A1 , A2>, 3> proto_grammar;
Chris@16 380 template<typename Expr, typename State, typename Data>
Chris@16 381 struct impl
Chris@16 382 : detail::pass_through_impl<function, deduce_domain, Expr, State, Data>
Chris@16 383 {};
Chris@16 384
Chris@16 385 typedef proto::tag::function proto_tag;
Chris@16 386 typedef A0 proto_child0; typedef A1 proto_child1; typedef A2 proto_child2;
Chris@16 387 typedef detail::if_vararg<A2> proto_child3; typedef detail::if_vararg<A2> proto_child4; typedef detail::if_vararg<A2> proto_child5; typedef detail::if_vararg<A2> proto_child6; typedef detail::if_vararg<A2> proto_child7; typedef detail::if_vararg<A2> proto_child8; typedef detail::if_vararg<A2> proto_child9;
Chris@16 388 };
Chris@16 389
Chris@16 390
Chris@16 391
Chris@16 392
Chris@16 393
Chris@16 394
Chris@16 395
Chris@16 396
Chris@16 397 template<typename Tag , typename A0 , typename A1 , typename A2>
Chris@16 398 struct nary_expr
Chris@16 399 <
Chris@16 400 Tag
Chris@16 401 , A0 , A1 , A2
Chris@16 402 , void , void , void , void , void , void , void
Chris@16 403 >
Chris@16 404 : proto::transform<
Chris@16 405 nary_expr<
Chris@16 406 Tag
Chris@16 407 , A0 , A1 , A2
Chris@16 408 , void , void , void , void , void , void , void
Chris@16 409 >
Chris@16 410 , int
Chris@16 411 >
Chris@16 412 {
Chris@16 413 typedef proto::expr<Tag, list3<A0 , A1 , A2>, 3> type;
Chris@16 414 typedef proto::basic_expr<Tag, list3<A0 , A1 , A2>, 3> proto_grammar;
Chris@16 415 template<typename Expr, typename State, typename Data>
Chris@16 416 struct impl
Chris@16 417 : detail::pass_through_impl<nary_expr, deduce_domain, Expr, State, Data>
Chris@16 418 {};
Chris@16 419
Chris@16 420 typedef Tag proto_tag;
Chris@16 421 typedef A0 proto_child0; typedef A1 proto_child1; typedef A2 proto_child2;
Chris@16 422 typedef detail::if_vararg<A2> proto_child3; typedef detail::if_vararg<A2> proto_child4; typedef detail::if_vararg<A2> proto_child5; typedef detail::if_vararg<A2> proto_child6; typedef detail::if_vararg<A2> proto_child7; typedef detail::if_vararg<A2> proto_child8; typedef detail::if_vararg<A2> proto_child9;
Chris@16 423 };
Chris@16 424 namespace detail
Chris@16 425 {
Chris@16 426 template<
Chris@16 427 template<typename , typename , typename> class T
Chris@16 428 , typename A0 , typename A1 , typename A2
Chris@16 429 >
Chris@16 430 struct is_callable_<T<A0 , A1 , A2> BOOST_PROTO_TEMPLATE_ARITY_PARAM(3)>
Chris@16 431 : is_same<A2, callable>
Chris@16 432 {};
Chris@16 433 }
Chris@16 434 namespace result_of
Chris@16 435 {
Chris@16 436
Chris@16 437
Chris@16 438
Chris@16 439
Chris@16 440
Chris@16 441
Chris@16 442 template<typename Expr>
Chris@16 443 struct child_c<Expr, 3>
Chris@16 444 {
Chris@16 445
Chris@16 446 BOOST_STATIC_ASSERT(0 != Expr::proto_arity_c);
Chris@16 447
Chris@16 448
Chris@16 449 typedef typename Expr::proto_child3 value_type;
Chris@16 450
Chris@16 451
Chris@16 452
Chris@16 453
Chris@16 454
Chris@16 455 typedef typename detail::expr_traits<typename Expr::proto_child3>::value_type type;
Chris@16 456 };
Chris@16 457 template<typename Expr>
Chris@16 458 struct child_c<Expr &, 3>
Chris@16 459 {
Chris@16 460
Chris@16 461 BOOST_STATIC_ASSERT(0 != Expr::proto_arity_c);
Chris@16 462
Chris@16 463
Chris@16 464 typedef typename Expr::proto_child3 value_type;
Chris@16 465
Chris@16 466
Chris@16 467
Chris@16 468
Chris@16 469
Chris@16 470 typedef typename detail::expr_traits<typename Expr::proto_child3>::reference type;
Chris@16 471
Chris@16 472
Chris@16 473 BOOST_FORCEINLINE
Chris@16 474 static type call(Expr &e)
Chris@16 475 {
Chris@16 476 return e.proto_base().child3;
Chris@16 477 }
Chris@16 478 };
Chris@16 479 template<typename Expr>
Chris@16 480 struct child_c<Expr const &, 3>
Chris@16 481 {
Chris@16 482
Chris@16 483 BOOST_STATIC_ASSERT(0 != Expr::proto_arity_c);
Chris@16 484
Chris@16 485
Chris@16 486 typedef typename Expr::proto_child3 value_type;
Chris@16 487
Chris@16 488
Chris@16 489
Chris@16 490
Chris@16 491
Chris@16 492 typedef typename detail::expr_traits<typename Expr::proto_child3>::const_reference type;
Chris@16 493
Chris@16 494
Chris@16 495 BOOST_FORCEINLINE
Chris@16 496 static type call(Expr const &e)
Chris@16 497 {
Chris@16 498 return e.proto_base().child3;
Chris@16 499 }
Chris@16 500 };
Chris@16 501 }
Chris@16 502
Chris@16 503
Chris@16 504
Chris@16 505
Chris@16 506 template<typename A0 , typename A1 , typename A2 , typename A3>
Chris@16 507 struct function
Chris@16 508 <
Chris@16 509 A0 , A1 , A2 , A3
Chris@16 510 , void , void , void , void , void , void
Chris@16 511 >
Chris@16 512 : proto::transform<
Chris@16 513 function<
Chris@16 514 A0 , A1 , A2 , A3
Chris@16 515 , void , void , void , void , void , void
Chris@16 516 >
Chris@16 517 , int
Chris@16 518 >
Chris@16 519 {
Chris@16 520 typedef proto::expr<proto::tag::function, list4<A0 , A1 , A2 , A3>, 4> type;
Chris@16 521 typedef proto::basic_expr<proto::tag::function, list4<A0 , A1 , A2 , A3>, 4> proto_grammar;
Chris@16 522 template<typename Expr, typename State, typename Data>
Chris@16 523 struct impl
Chris@16 524 : detail::pass_through_impl<function, deduce_domain, Expr, State, Data>
Chris@16 525 {};
Chris@16 526
Chris@16 527 typedef proto::tag::function proto_tag;
Chris@16 528 typedef A0 proto_child0; typedef A1 proto_child1; typedef A2 proto_child2; typedef A3 proto_child3;
Chris@16 529 typedef detail::if_vararg<A3> proto_child4; typedef detail::if_vararg<A3> proto_child5; typedef detail::if_vararg<A3> proto_child6; typedef detail::if_vararg<A3> proto_child7; typedef detail::if_vararg<A3> proto_child8; typedef detail::if_vararg<A3> proto_child9;
Chris@16 530 };
Chris@16 531
Chris@16 532
Chris@16 533
Chris@16 534
Chris@16 535
Chris@16 536
Chris@16 537
Chris@16 538
Chris@16 539 template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3>
Chris@16 540 struct nary_expr
Chris@16 541 <
Chris@16 542 Tag
Chris@16 543 , A0 , A1 , A2 , A3
Chris@16 544 , void , void , void , void , void , void
Chris@16 545 >
Chris@16 546 : proto::transform<
Chris@16 547 nary_expr<
Chris@16 548 Tag
Chris@16 549 , A0 , A1 , A2 , A3
Chris@16 550 , void , void , void , void , void , void
Chris@16 551 >
Chris@16 552 , int
Chris@16 553 >
Chris@16 554 {
Chris@16 555 typedef proto::expr<Tag, list4<A0 , A1 , A2 , A3>, 4> type;
Chris@16 556 typedef proto::basic_expr<Tag, list4<A0 , A1 , A2 , A3>, 4> proto_grammar;
Chris@16 557 template<typename Expr, typename State, typename Data>
Chris@16 558 struct impl
Chris@16 559 : detail::pass_through_impl<nary_expr, deduce_domain, Expr, State, Data>
Chris@16 560 {};
Chris@16 561
Chris@16 562 typedef Tag proto_tag;
Chris@16 563 typedef A0 proto_child0; typedef A1 proto_child1; typedef A2 proto_child2; typedef A3 proto_child3;
Chris@16 564 typedef detail::if_vararg<A3> proto_child4; typedef detail::if_vararg<A3> proto_child5; typedef detail::if_vararg<A3> proto_child6; typedef detail::if_vararg<A3> proto_child7; typedef detail::if_vararg<A3> proto_child8; typedef detail::if_vararg<A3> proto_child9;
Chris@16 565 };
Chris@16 566 namespace detail
Chris@16 567 {
Chris@16 568 template<
Chris@16 569 template<typename , typename , typename , typename> class T
Chris@16 570 , typename A0 , typename A1 , typename A2 , typename A3
Chris@16 571 >
Chris@16 572 struct is_callable_<T<A0 , A1 , A2 , A3> BOOST_PROTO_TEMPLATE_ARITY_PARAM(4)>
Chris@16 573 : is_same<A3, callable>
Chris@16 574 {};
Chris@16 575 }
Chris@16 576 namespace result_of
Chris@16 577 {
Chris@16 578
Chris@16 579
Chris@16 580
Chris@16 581
Chris@16 582
Chris@16 583
Chris@16 584 template<typename Expr>
Chris@16 585 struct child_c<Expr, 4>
Chris@16 586 {
Chris@16 587
Chris@16 588 BOOST_STATIC_ASSERT(0 != Expr::proto_arity_c);
Chris@16 589
Chris@16 590
Chris@16 591 typedef typename Expr::proto_child4 value_type;
Chris@16 592
Chris@16 593
Chris@16 594
Chris@16 595
Chris@16 596
Chris@16 597 typedef typename detail::expr_traits<typename Expr::proto_child4>::value_type type;
Chris@16 598 };
Chris@16 599 template<typename Expr>
Chris@16 600 struct child_c<Expr &, 4>
Chris@16 601 {
Chris@16 602
Chris@16 603 BOOST_STATIC_ASSERT(0 != Expr::proto_arity_c);
Chris@16 604
Chris@16 605
Chris@16 606 typedef typename Expr::proto_child4 value_type;
Chris@16 607
Chris@16 608
Chris@16 609
Chris@16 610
Chris@16 611
Chris@16 612 typedef typename detail::expr_traits<typename Expr::proto_child4>::reference type;
Chris@16 613
Chris@16 614
Chris@16 615 BOOST_FORCEINLINE
Chris@16 616 static type call(Expr &e)
Chris@16 617 {
Chris@16 618 return e.proto_base().child4;
Chris@16 619 }
Chris@16 620 };
Chris@16 621 template<typename Expr>
Chris@16 622 struct child_c<Expr const &, 4>
Chris@16 623 {
Chris@16 624
Chris@16 625 BOOST_STATIC_ASSERT(0 != Expr::proto_arity_c);
Chris@16 626
Chris@16 627
Chris@16 628 typedef typename Expr::proto_child4 value_type;
Chris@16 629
Chris@16 630
Chris@16 631
Chris@16 632
Chris@16 633
Chris@16 634 typedef typename detail::expr_traits<typename Expr::proto_child4>::const_reference type;
Chris@16 635
Chris@16 636
Chris@16 637 BOOST_FORCEINLINE
Chris@16 638 static type call(Expr const &e)
Chris@16 639 {
Chris@16 640 return e.proto_base().child4;
Chris@16 641 }
Chris@16 642 };
Chris@16 643 }
Chris@16 644
Chris@16 645
Chris@16 646
Chris@16 647
Chris@16 648 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
Chris@16 649 struct function
Chris@16 650 <
Chris@16 651 A0 , A1 , A2 , A3 , A4
Chris@16 652 , void , void , void , void , void
Chris@16 653 >
Chris@16 654 : proto::transform<
Chris@16 655 function<
Chris@16 656 A0 , A1 , A2 , A3 , A4
Chris@16 657 , void , void , void , void , void
Chris@16 658 >
Chris@16 659 , int
Chris@16 660 >
Chris@16 661 {
Chris@16 662 typedef proto::expr<proto::tag::function, list5<A0 , A1 , A2 , A3 , A4>, 5> type;
Chris@16 663 typedef proto::basic_expr<proto::tag::function, list5<A0 , A1 , A2 , A3 , A4>, 5> proto_grammar;
Chris@16 664 template<typename Expr, typename State, typename Data>
Chris@16 665 struct impl
Chris@16 666 : detail::pass_through_impl<function, deduce_domain, Expr, State, Data>
Chris@16 667 {};
Chris@16 668
Chris@16 669 typedef proto::tag::function proto_tag;
Chris@16 670 typedef A0 proto_child0; typedef A1 proto_child1; typedef A2 proto_child2; typedef A3 proto_child3; typedef A4 proto_child4;
Chris@16 671 typedef detail::if_vararg<A4> proto_child5; typedef detail::if_vararg<A4> proto_child6; typedef detail::if_vararg<A4> proto_child7; typedef detail::if_vararg<A4> proto_child8; typedef detail::if_vararg<A4> proto_child9;
Chris@16 672 };
Chris@16 673
Chris@16 674
Chris@16 675
Chris@16 676
Chris@16 677
Chris@16 678
Chris@16 679
Chris@16 680
Chris@16 681 template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
Chris@16 682 struct nary_expr
Chris@16 683 <
Chris@16 684 Tag
Chris@16 685 , A0 , A1 , A2 , A3 , A4
Chris@16 686 , void , void , void , void , void
Chris@16 687 >
Chris@16 688 : proto::transform<
Chris@16 689 nary_expr<
Chris@16 690 Tag
Chris@16 691 , A0 , A1 , A2 , A3 , A4
Chris@16 692 , void , void , void , void , void
Chris@16 693 >
Chris@16 694 , int
Chris@16 695 >
Chris@16 696 {
Chris@16 697 typedef proto::expr<Tag, list5<A0 , A1 , A2 , A3 , A4>, 5> type;
Chris@16 698 typedef proto::basic_expr<Tag, list5<A0 , A1 , A2 , A3 , A4>, 5> proto_grammar;
Chris@16 699 template<typename Expr, typename State, typename Data>
Chris@16 700 struct impl
Chris@16 701 : detail::pass_through_impl<nary_expr, deduce_domain, Expr, State, Data>
Chris@16 702 {};
Chris@16 703
Chris@16 704 typedef Tag proto_tag;
Chris@16 705 typedef A0 proto_child0; typedef A1 proto_child1; typedef A2 proto_child2; typedef A3 proto_child3; typedef A4 proto_child4;
Chris@16 706 typedef detail::if_vararg<A4> proto_child5; typedef detail::if_vararg<A4> proto_child6; typedef detail::if_vararg<A4> proto_child7; typedef detail::if_vararg<A4> proto_child8; typedef detail::if_vararg<A4> proto_child9;
Chris@16 707 };
Chris@16 708 namespace detail
Chris@16 709 {
Chris@16 710 template<
Chris@16 711 template<typename , typename , typename , typename , typename> class T
Chris@16 712 , typename A0 , typename A1 , typename A2 , typename A3 , typename A4
Chris@16 713 >
Chris@16 714 struct is_callable_<T<A0 , A1 , A2 , A3 , A4> BOOST_PROTO_TEMPLATE_ARITY_PARAM(5)>
Chris@16 715 : is_same<A4, callable>
Chris@16 716 {};
Chris@16 717 }
Chris@16 718 namespace result_of
Chris@16 719 {
Chris@16 720
Chris@16 721
Chris@16 722
Chris@16 723
Chris@16 724
Chris@16 725
Chris@16 726 template<typename Expr>
Chris@16 727 struct child_c<Expr, 5>
Chris@16 728 {
Chris@16 729
Chris@16 730 BOOST_STATIC_ASSERT(0 != Expr::proto_arity_c);
Chris@16 731
Chris@16 732
Chris@16 733 typedef typename Expr::proto_child5 value_type;
Chris@16 734
Chris@16 735
Chris@16 736
Chris@16 737
Chris@16 738
Chris@16 739 typedef typename detail::expr_traits<typename Expr::proto_child5>::value_type type;
Chris@16 740 };
Chris@16 741 template<typename Expr>
Chris@16 742 struct child_c<Expr &, 5>
Chris@16 743 {
Chris@16 744
Chris@16 745 BOOST_STATIC_ASSERT(0 != Expr::proto_arity_c);
Chris@16 746
Chris@16 747
Chris@16 748 typedef typename Expr::proto_child5 value_type;
Chris@16 749
Chris@16 750
Chris@16 751
Chris@16 752
Chris@16 753
Chris@16 754 typedef typename detail::expr_traits<typename Expr::proto_child5>::reference type;
Chris@16 755
Chris@16 756
Chris@16 757 BOOST_FORCEINLINE
Chris@16 758 static type call(Expr &e)
Chris@16 759 {
Chris@16 760 return e.proto_base().child5;
Chris@16 761 }
Chris@16 762 };
Chris@16 763 template<typename Expr>
Chris@16 764 struct child_c<Expr const &, 5>
Chris@16 765 {
Chris@16 766
Chris@16 767 BOOST_STATIC_ASSERT(0 != Expr::proto_arity_c);
Chris@16 768
Chris@16 769
Chris@16 770 typedef typename Expr::proto_child5 value_type;
Chris@16 771
Chris@16 772
Chris@16 773
Chris@16 774
Chris@16 775
Chris@16 776 typedef typename detail::expr_traits<typename Expr::proto_child5>::const_reference type;
Chris@16 777
Chris@16 778
Chris@16 779 BOOST_FORCEINLINE
Chris@16 780 static type call(Expr const &e)
Chris@16 781 {
Chris@16 782 return e.proto_base().child5;
Chris@16 783 }
Chris@16 784 };
Chris@16 785 }
Chris@16 786
Chris@16 787
Chris@16 788
Chris@16 789
Chris@16 790 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
Chris@16 791 struct function
Chris@16 792 <
Chris@16 793 A0 , A1 , A2 , A3 , A4 , A5
Chris@16 794 , void , void , void , void
Chris@16 795 >
Chris@16 796 : proto::transform<
Chris@16 797 function<
Chris@16 798 A0 , A1 , A2 , A3 , A4 , A5
Chris@16 799 , void , void , void , void
Chris@16 800 >
Chris@16 801 , int
Chris@16 802 >
Chris@16 803 {
Chris@16 804 typedef proto::expr<proto::tag::function, list6<A0 , A1 , A2 , A3 , A4 , A5>, 6> type;
Chris@16 805 typedef proto::basic_expr<proto::tag::function, list6<A0 , A1 , A2 , A3 , A4 , A5>, 6> proto_grammar;
Chris@16 806 template<typename Expr, typename State, typename Data>
Chris@16 807 struct impl
Chris@16 808 : detail::pass_through_impl<function, deduce_domain, Expr, State, Data>
Chris@16 809 {};
Chris@16 810
Chris@16 811 typedef proto::tag::function proto_tag;
Chris@16 812 typedef A0 proto_child0; typedef A1 proto_child1; typedef A2 proto_child2; typedef A3 proto_child3; typedef A4 proto_child4; typedef A5 proto_child5;
Chris@16 813 typedef detail::if_vararg<A5> proto_child6; typedef detail::if_vararg<A5> proto_child7; typedef detail::if_vararg<A5> proto_child8; typedef detail::if_vararg<A5> proto_child9;
Chris@16 814 };
Chris@16 815
Chris@16 816
Chris@16 817
Chris@16 818
Chris@16 819
Chris@16 820
Chris@16 821
Chris@16 822
Chris@16 823 template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
Chris@16 824 struct nary_expr
Chris@16 825 <
Chris@16 826 Tag
Chris@16 827 , A0 , A1 , A2 , A3 , A4 , A5
Chris@16 828 , void , void , void , void
Chris@16 829 >
Chris@16 830 : proto::transform<
Chris@16 831 nary_expr<
Chris@16 832 Tag
Chris@16 833 , A0 , A1 , A2 , A3 , A4 , A5
Chris@16 834 , void , void , void , void
Chris@16 835 >
Chris@16 836 , int
Chris@16 837 >
Chris@16 838 {
Chris@16 839 typedef proto::expr<Tag, list6<A0 , A1 , A2 , A3 , A4 , A5>, 6> type;
Chris@16 840 typedef proto::basic_expr<Tag, list6<A0 , A1 , A2 , A3 , A4 , A5>, 6> proto_grammar;
Chris@16 841 template<typename Expr, typename State, typename Data>
Chris@16 842 struct impl
Chris@16 843 : detail::pass_through_impl<nary_expr, deduce_domain, Expr, State, Data>
Chris@16 844 {};
Chris@16 845
Chris@16 846 typedef Tag proto_tag;
Chris@16 847 typedef A0 proto_child0; typedef A1 proto_child1; typedef A2 proto_child2; typedef A3 proto_child3; typedef A4 proto_child4; typedef A5 proto_child5;
Chris@16 848 typedef detail::if_vararg<A5> proto_child6; typedef detail::if_vararg<A5> proto_child7; typedef detail::if_vararg<A5> proto_child8; typedef detail::if_vararg<A5> proto_child9;
Chris@16 849 };
Chris@16 850 namespace detail
Chris@16 851 {
Chris@16 852 template<
Chris@16 853 template<typename , typename , typename , typename , typename , typename> class T
Chris@16 854 , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5
Chris@16 855 >
Chris@16 856 struct is_callable_<T<A0 , A1 , A2 , A3 , A4 , A5> BOOST_PROTO_TEMPLATE_ARITY_PARAM(6)>
Chris@16 857 : is_same<A5, callable>
Chris@16 858 {};
Chris@16 859 }
Chris@16 860 namespace result_of
Chris@16 861 {
Chris@16 862
Chris@16 863
Chris@16 864
Chris@16 865
Chris@16 866
Chris@16 867
Chris@16 868 template<typename Expr>
Chris@16 869 struct child_c<Expr, 6>
Chris@16 870 {
Chris@16 871
Chris@16 872 BOOST_STATIC_ASSERT(0 != Expr::proto_arity_c);
Chris@16 873
Chris@16 874
Chris@16 875 typedef typename Expr::proto_child6 value_type;
Chris@16 876
Chris@16 877
Chris@16 878
Chris@16 879
Chris@16 880
Chris@16 881 typedef typename detail::expr_traits<typename Expr::proto_child6>::value_type type;
Chris@16 882 };
Chris@16 883 template<typename Expr>
Chris@16 884 struct child_c<Expr &, 6>
Chris@16 885 {
Chris@16 886
Chris@16 887 BOOST_STATIC_ASSERT(0 != Expr::proto_arity_c);
Chris@16 888
Chris@16 889
Chris@16 890 typedef typename Expr::proto_child6 value_type;
Chris@16 891
Chris@16 892
Chris@16 893
Chris@16 894
Chris@16 895
Chris@16 896 typedef typename detail::expr_traits<typename Expr::proto_child6>::reference type;
Chris@16 897
Chris@16 898
Chris@16 899 BOOST_FORCEINLINE
Chris@16 900 static type call(Expr &e)
Chris@16 901 {
Chris@16 902 return e.proto_base().child6;
Chris@16 903 }
Chris@16 904 };
Chris@16 905 template<typename Expr>
Chris@16 906 struct child_c<Expr const &, 6>
Chris@16 907 {
Chris@16 908
Chris@16 909 BOOST_STATIC_ASSERT(0 != Expr::proto_arity_c);
Chris@16 910
Chris@16 911
Chris@16 912 typedef typename Expr::proto_child6 value_type;
Chris@16 913
Chris@16 914
Chris@16 915
Chris@16 916
Chris@16 917
Chris@16 918 typedef typename detail::expr_traits<typename Expr::proto_child6>::const_reference type;
Chris@16 919
Chris@16 920
Chris@16 921 BOOST_FORCEINLINE
Chris@16 922 static type call(Expr const &e)
Chris@16 923 {
Chris@16 924 return e.proto_base().child6;
Chris@16 925 }
Chris@16 926 };
Chris@16 927 }
Chris@16 928
Chris@16 929
Chris@16 930
Chris@16 931
Chris@16 932 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
Chris@16 933 struct function
Chris@16 934 <
Chris@16 935 A0 , A1 , A2 , A3 , A4 , A5 , A6
Chris@16 936 , void , void , void
Chris@16 937 >
Chris@16 938 : proto::transform<
Chris@16 939 function<
Chris@16 940 A0 , A1 , A2 , A3 , A4 , A5 , A6
Chris@16 941 , void , void , void
Chris@16 942 >
Chris@16 943 , int
Chris@16 944 >
Chris@16 945 {
Chris@16 946 typedef proto::expr<proto::tag::function, list7<A0 , A1 , A2 , A3 , A4 , A5 , A6>, 7> type;
Chris@16 947 typedef proto::basic_expr<proto::tag::function, list7<A0 , A1 , A2 , A3 , A4 , A5 , A6>, 7> proto_grammar;
Chris@16 948 template<typename Expr, typename State, typename Data>
Chris@16 949 struct impl
Chris@16 950 : detail::pass_through_impl<function, deduce_domain, Expr, State, Data>
Chris@16 951 {};
Chris@16 952
Chris@16 953 typedef proto::tag::function proto_tag;
Chris@16 954 typedef A0 proto_child0; typedef A1 proto_child1; typedef A2 proto_child2; typedef A3 proto_child3; typedef A4 proto_child4; typedef A5 proto_child5; typedef A6 proto_child6;
Chris@16 955 typedef detail::if_vararg<A6> proto_child7; typedef detail::if_vararg<A6> proto_child8; typedef detail::if_vararg<A6> proto_child9;
Chris@16 956 };
Chris@16 957
Chris@16 958
Chris@16 959
Chris@16 960
Chris@16 961
Chris@16 962
Chris@16 963
Chris@16 964
Chris@16 965 template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
Chris@16 966 struct nary_expr
Chris@16 967 <
Chris@16 968 Tag
Chris@16 969 , A0 , A1 , A2 , A3 , A4 , A5 , A6
Chris@16 970 , void , void , void
Chris@16 971 >
Chris@16 972 : proto::transform<
Chris@16 973 nary_expr<
Chris@16 974 Tag
Chris@16 975 , A0 , A1 , A2 , A3 , A4 , A5 , A6
Chris@16 976 , void , void , void
Chris@16 977 >
Chris@16 978 , int
Chris@16 979 >
Chris@16 980 {
Chris@16 981 typedef proto::expr<Tag, list7<A0 , A1 , A2 , A3 , A4 , A5 , A6>, 7> type;
Chris@16 982 typedef proto::basic_expr<Tag, list7<A0 , A1 , A2 , A3 , A4 , A5 , A6>, 7> proto_grammar;
Chris@16 983 template<typename Expr, typename State, typename Data>
Chris@16 984 struct impl
Chris@16 985 : detail::pass_through_impl<nary_expr, deduce_domain, Expr, State, Data>
Chris@16 986 {};
Chris@16 987
Chris@16 988 typedef Tag proto_tag;
Chris@16 989 typedef A0 proto_child0; typedef A1 proto_child1; typedef A2 proto_child2; typedef A3 proto_child3; typedef A4 proto_child4; typedef A5 proto_child5; typedef A6 proto_child6;
Chris@16 990 typedef detail::if_vararg<A6> proto_child7; typedef detail::if_vararg<A6> proto_child8; typedef detail::if_vararg<A6> proto_child9;
Chris@16 991 };
Chris@16 992 namespace detail
Chris@16 993 {
Chris@16 994 template<
Chris@16 995 template<typename , typename , typename , typename , typename , typename , typename> class T
Chris@16 996 , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6
Chris@16 997 >
Chris@16 998 struct is_callable_<T<A0 , A1 , A2 , A3 , A4 , A5 , A6> BOOST_PROTO_TEMPLATE_ARITY_PARAM(7)>
Chris@16 999 : is_same<A6, callable>
Chris@16 1000 {};
Chris@16 1001 }
Chris@16 1002 namespace result_of
Chris@16 1003 {
Chris@16 1004
Chris@16 1005
Chris@16 1006
Chris@16 1007
Chris@16 1008
Chris@16 1009
Chris@16 1010 template<typename Expr>
Chris@16 1011 struct child_c<Expr, 7>
Chris@16 1012 {
Chris@16 1013
Chris@16 1014 BOOST_STATIC_ASSERT(0 != Expr::proto_arity_c);
Chris@16 1015
Chris@16 1016
Chris@16 1017 typedef typename Expr::proto_child7 value_type;
Chris@16 1018
Chris@16 1019
Chris@16 1020
Chris@16 1021
Chris@16 1022
Chris@16 1023 typedef typename detail::expr_traits<typename Expr::proto_child7>::value_type type;
Chris@16 1024 };
Chris@16 1025 template<typename Expr>
Chris@16 1026 struct child_c<Expr &, 7>
Chris@16 1027 {
Chris@16 1028
Chris@16 1029 BOOST_STATIC_ASSERT(0 != Expr::proto_arity_c);
Chris@16 1030
Chris@16 1031
Chris@16 1032 typedef typename Expr::proto_child7 value_type;
Chris@16 1033
Chris@16 1034
Chris@16 1035
Chris@16 1036
Chris@16 1037
Chris@16 1038 typedef typename detail::expr_traits<typename Expr::proto_child7>::reference type;
Chris@16 1039
Chris@16 1040
Chris@16 1041 BOOST_FORCEINLINE
Chris@16 1042 static type call(Expr &e)
Chris@16 1043 {
Chris@16 1044 return e.proto_base().child7;
Chris@16 1045 }
Chris@16 1046 };
Chris@16 1047 template<typename Expr>
Chris@16 1048 struct child_c<Expr const &, 7>
Chris@16 1049 {
Chris@16 1050
Chris@16 1051 BOOST_STATIC_ASSERT(0 != Expr::proto_arity_c);
Chris@16 1052
Chris@16 1053
Chris@16 1054 typedef typename Expr::proto_child7 value_type;
Chris@16 1055
Chris@16 1056
Chris@16 1057
Chris@16 1058
Chris@16 1059
Chris@16 1060 typedef typename detail::expr_traits<typename Expr::proto_child7>::const_reference type;
Chris@16 1061
Chris@16 1062
Chris@16 1063 BOOST_FORCEINLINE
Chris@16 1064 static type call(Expr const &e)
Chris@16 1065 {
Chris@16 1066 return e.proto_base().child7;
Chris@16 1067 }
Chris@16 1068 };
Chris@16 1069 }
Chris@16 1070
Chris@16 1071
Chris@16 1072
Chris@16 1073
Chris@16 1074 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
Chris@16 1075 struct function
Chris@16 1076 <
Chris@16 1077 A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7
Chris@16 1078 , void , void
Chris@16 1079 >
Chris@16 1080 : proto::transform<
Chris@16 1081 function<
Chris@16 1082 A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7
Chris@16 1083 , void , void
Chris@16 1084 >
Chris@16 1085 , int
Chris@16 1086 >
Chris@16 1087 {
Chris@16 1088 typedef proto::expr<proto::tag::function, list8<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7>, 8> type;
Chris@16 1089 typedef proto::basic_expr<proto::tag::function, list8<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7>, 8> proto_grammar;
Chris@16 1090 template<typename Expr, typename State, typename Data>
Chris@16 1091 struct impl
Chris@16 1092 : detail::pass_through_impl<function, deduce_domain, Expr, State, Data>
Chris@16 1093 {};
Chris@16 1094
Chris@16 1095 typedef proto::tag::function proto_tag;
Chris@16 1096 typedef A0 proto_child0; typedef A1 proto_child1; typedef A2 proto_child2; typedef A3 proto_child3; typedef A4 proto_child4; typedef A5 proto_child5; typedef A6 proto_child6; typedef A7 proto_child7;
Chris@16 1097 typedef detail::if_vararg<A7> proto_child8; typedef detail::if_vararg<A7> proto_child9;
Chris@16 1098 };
Chris@16 1099
Chris@16 1100
Chris@16 1101
Chris@16 1102
Chris@16 1103
Chris@16 1104
Chris@16 1105
Chris@16 1106
Chris@16 1107 template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
Chris@16 1108 struct nary_expr
Chris@16 1109 <
Chris@16 1110 Tag
Chris@16 1111 , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7
Chris@16 1112 , void , void
Chris@16 1113 >
Chris@16 1114 : proto::transform<
Chris@16 1115 nary_expr<
Chris@16 1116 Tag
Chris@16 1117 , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7
Chris@16 1118 , void , void
Chris@16 1119 >
Chris@16 1120 , int
Chris@16 1121 >
Chris@16 1122 {
Chris@16 1123 typedef proto::expr<Tag, list8<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7>, 8> type;
Chris@16 1124 typedef proto::basic_expr<Tag, list8<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7>, 8> proto_grammar;
Chris@16 1125 template<typename Expr, typename State, typename Data>
Chris@16 1126 struct impl
Chris@16 1127 : detail::pass_through_impl<nary_expr, deduce_domain, Expr, State, Data>
Chris@16 1128 {};
Chris@16 1129
Chris@16 1130 typedef Tag proto_tag;
Chris@16 1131 typedef A0 proto_child0; typedef A1 proto_child1; typedef A2 proto_child2; typedef A3 proto_child3; typedef A4 proto_child4; typedef A5 proto_child5; typedef A6 proto_child6; typedef A7 proto_child7;
Chris@16 1132 typedef detail::if_vararg<A7> proto_child8; typedef detail::if_vararg<A7> proto_child9;
Chris@16 1133 };
Chris@16 1134 namespace detail
Chris@16 1135 {
Chris@16 1136 template<
Chris@16 1137 template<typename , typename , typename , typename , typename , typename , typename , typename> class T
Chris@16 1138 , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7
Chris@16 1139 >
Chris@16 1140 struct is_callable_<T<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7> BOOST_PROTO_TEMPLATE_ARITY_PARAM(8)>
Chris@16 1141 : is_same<A7, callable>
Chris@16 1142 {};
Chris@16 1143 }
Chris@16 1144 namespace result_of
Chris@16 1145 {
Chris@16 1146
Chris@16 1147
Chris@16 1148
Chris@16 1149
Chris@16 1150
Chris@16 1151
Chris@16 1152 template<typename Expr>
Chris@16 1153 struct child_c<Expr, 8>
Chris@16 1154 {
Chris@16 1155
Chris@16 1156 BOOST_STATIC_ASSERT(0 != Expr::proto_arity_c);
Chris@16 1157
Chris@16 1158
Chris@16 1159 typedef typename Expr::proto_child8 value_type;
Chris@16 1160
Chris@16 1161
Chris@16 1162
Chris@16 1163
Chris@16 1164
Chris@16 1165 typedef typename detail::expr_traits<typename Expr::proto_child8>::value_type type;
Chris@16 1166 };
Chris@16 1167 template<typename Expr>
Chris@16 1168 struct child_c<Expr &, 8>
Chris@16 1169 {
Chris@16 1170
Chris@16 1171 BOOST_STATIC_ASSERT(0 != Expr::proto_arity_c);
Chris@16 1172
Chris@16 1173
Chris@16 1174 typedef typename Expr::proto_child8 value_type;
Chris@16 1175
Chris@16 1176
Chris@16 1177
Chris@16 1178
Chris@16 1179
Chris@16 1180 typedef typename detail::expr_traits<typename Expr::proto_child8>::reference type;
Chris@16 1181
Chris@16 1182
Chris@16 1183 BOOST_FORCEINLINE
Chris@16 1184 static type call(Expr &e)
Chris@16 1185 {
Chris@16 1186 return e.proto_base().child8;
Chris@16 1187 }
Chris@16 1188 };
Chris@16 1189 template<typename Expr>
Chris@16 1190 struct child_c<Expr const &, 8>
Chris@16 1191 {
Chris@16 1192
Chris@16 1193 BOOST_STATIC_ASSERT(0 != Expr::proto_arity_c);
Chris@16 1194
Chris@16 1195
Chris@16 1196 typedef typename Expr::proto_child8 value_type;
Chris@16 1197
Chris@16 1198
Chris@16 1199
Chris@16 1200
Chris@16 1201
Chris@16 1202 typedef typename detail::expr_traits<typename Expr::proto_child8>::const_reference type;
Chris@16 1203
Chris@16 1204
Chris@16 1205 BOOST_FORCEINLINE
Chris@16 1206 static type call(Expr const &e)
Chris@16 1207 {
Chris@16 1208 return e.proto_base().child8;
Chris@16 1209 }
Chris@16 1210 };
Chris@16 1211 }
Chris@16 1212
Chris@16 1213
Chris@16 1214
Chris@16 1215
Chris@16 1216 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
Chris@16 1217 struct function
Chris@16 1218 <
Chris@16 1219 A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8
Chris@16 1220 , void
Chris@16 1221 >
Chris@16 1222 : proto::transform<
Chris@16 1223 function<
Chris@16 1224 A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8
Chris@16 1225 , void
Chris@16 1226 >
Chris@16 1227 , int
Chris@16 1228 >
Chris@16 1229 {
Chris@16 1230 typedef proto::expr<proto::tag::function, list9<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8>, 9> type;
Chris@16 1231 typedef proto::basic_expr<proto::tag::function, list9<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8>, 9> proto_grammar;
Chris@16 1232 template<typename Expr, typename State, typename Data>
Chris@16 1233 struct impl
Chris@16 1234 : detail::pass_through_impl<function, deduce_domain, Expr, State, Data>
Chris@16 1235 {};
Chris@16 1236
Chris@16 1237 typedef proto::tag::function proto_tag;
Chris@16 1238 typedef A0 proto_child0; typedef A1 proto_child1; typedef A2 proto_child2; typedef A3 proto_child3; typedef A4 proto_child4; typedef A5 proto_child5; typedef A6 proto_child6; typedef A7 proto_child7; typedef A8 proto_child8;
Chris@16 1239 typedef detail::if_vararg<A8> proto_child9;
Chris@16 1240 };
Chris@16 1241
Chris@16 1242
Chris@16 1243
Chris@16 1244
Chris@16 1245
Chris@16 1246
Chris@16 1247
Chris@16 1248
Chris@16 1249 template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
Chris@16 1250 struct nary_expr
Chris@16 1251 <
Chris@16 1252 Tag
Chris@16 1253 , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8
Chris@16 1254 , void
Chris@16 1255 >
Chris@16 1256 : proto::transform<
Chris@16 1257 nary_expr<
Chris@16 1258 Tag
Chris@16 1259 , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8
Chris@16 1260 , void
Chris@16 1261 >
Chris@16 1262 , int
Chris@16 1263 >
Chris@16 1264 {
Chris@16 1265 typedef proto::expr<Tag, list9<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8>, 9> type;
Chris@16 1266 typedef proto::basic_expr<Tag, list9<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8>, 9> proto_grammar;
Chris@16 1267 template<typename Expr, typename State, typename Data>
Chris@16 1268 struct impl
Chris@16 1269 : detail::pass_through_impl<nary_expr, deduce_domain, Expr, State, Data>
Chris@16 1270 {};
Chris@16 1271
Chris@16 1272 typedef Tag proto_tag;
Chris@16 1273 typedef A0 proto_child0; typedef A1 proto_child1; typedef A2 proto_child2; typedef A3 proto_child3; typedef A4 proto_child4; typedef A5 proto_child5; typedef A6 proto_child6; typedef A7 proto_child7; typedef A8 proto_child8;
Chris@16 1274 typedef detail::if_vararg<A8> proto_child9;
Chris@16 1275 };
Chris@16 1276 namespace detail
Chris@16 1277 {
Chris@16 1278 template<
Chris@16 1279 template<typename , typename , typename , typename , typename , typename , typename , typename , typename> class T
Chris@16 1280 , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8
Chris@16 1281 >
Chris@16 1282 struct is_callable_<T<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8> BOOST_PROTO_TEMPLATE_ARITY_PARAM(9)>
Chris@16 1283 : is_same<A8, callable>
Chris@16 1284 {};
Chris@16 1285 }
Chris@16 1286 namespace result_of
Chris@16 1287 {
Chris@16 1288
Chris@16 1289
Chris@16 1290
Chris@16 1291
Chris@16 1292
Chris@16 1293
Chris@16 1294 template<typename Expr>
Chris@16 1295 struct child_c<Expr, 9>
Chris@16 1296 {
Chris@16 1297
Chris@16 1298 BOOST_STATIC_ASSERT(0 != Expr::proto_arity_c);
Chris@16 1299
Chris@16 1300
Chris@16 1301 typedef typename Expr::proto_child9 value_type;
Chris@16 1302
Chris@16 1303
Chris@16 1304
Chris@16 1305
Chris@16 1306
Chris@16 1307 typedef typename detail::expr_traits<typename Expr::proto_child9>::value_type type;
Chris@16 1308 };
Chris@16 1309 template<typename Expr>
Chris@16 1310 struct child_c<Expr &, 9>
Chris@16 1311 {
Chris@16 1312
Chris@16 1313 BOOST_STATIC_ASSERT(0 != Expr::proto_arity_c);
Chris@16 1314
Chris@16 1315
Chris@16 1316 typedef typename Expr::proto_child9 value_type;
Chris@16 1317
Chris@16 1318
Chris@16 1319
Chris@16 1320
Chris@16 1321
Chris@16 1322 typedef typename detail::expr_traits<typename Expr::proto_child9>::reference type;
Chris@16 1323
Chris@16 1324
Chris@16 1325 BOOST_FORCEINLINE
Chris@16 1326 static type call(Expr &e)
Chris@16 1327 {
Chris@16 1328 return e.proto_base().child9;
Chris@16 1329 }
Chris@16 1330 };
Chris@16 1331 template<typename Expr>
Chris@16 1332 struct child_c<Expr const &, 9>
Chris@16 1333 {
Chris@16 1334
Chris@16 1335 BOOST_STATIC_ASSERT(0 != Expr::proto_arity_c);
Chris@16 1336
Chris@16 1337
Chris@16 1338 typedef typename Expr::proto_child9 value_type;
Chris@16 1339
Chris@16 1340
Chris@16 1341
Chris@16 1342
Chris@16 1343
Chris@16 1344 typedef typename detail::expr_traits<typename Expr::proto_child9>::const_reference type;
Chris@16 1345
Chris@16 1346
Chris@16 1347 BOOST_FORCEINLINE
Chris@16 1348 static type call(Expr const &e)
Chris@16 1349 {
Chris@16 1350 return e.proto_base().child9;
Chris@16 1351 }
Chris@16 1352 };
Chris@16 1353 }
Chris@16 1354
Chris@16 1355
Chris@16 1356
Chris@16 1357
Chris@16 1358 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
Chris@16 1359 struct function
Chris@16 1360 : proto::transform<
Chris@16 1361 function<
Chris@16 1362 A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9
Chris@16 1363
Chris@16 1364 >
Chris@16 1365 , int
Chris@16 1366 >
Chris@16 1367 {
Chris@16 1368 typedef proto::expr<proto::tag::function, list10<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9>, 10> type;
Chris@16 1369 typedef proto::basic_expr<proto::tag::function, list10<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9>, 10> proto_grammar;
Chris@16 1370 template<typename Expr, typename State, typename Data>
Chris@16 1371 struct impl
Chris@16 1372 : detail::pass_through_impl<function, deduce_domain, Expr, State, Data>
Chris@16 1373 {};
Chris@16 1374
Chris@16 1375 typedef proto::tag::function proto_tag;
Chris@16 1376 typedef A0 proto_child0; typedef A1 proto_child1; typedef A2 proto_child2; typedef A3 proto_child3; typedef A4 proto_child4; typedef A5 proto_child5; typedef A6 proto_child6; typedef A7 proto_child7; typedef A8 proto_child8; typedef A9 proto_child9;
Chris@16 1377
Chris@16 1378 };
Chris@16 1379
Chris@16 1380
Chris@16 1381
Chris@16 1382
Chris@16 1383
Chris@16 1384
Chris@16 1385
Chris@16 1386
Chris@16 1387 template<typename Tag , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
Chris@16 1388 struct nary_expr
Chris@16 1389 : proto::transform<
Chris@16 1390 nary_expr<
Chris@16 1391 Tag
Chris@16 1392 , A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9
Chris@16 1393
Chris@16 1394 >
Chris@16 1395 , int
Chris@16 1396 >
Chris@16 1397 {
Chris@16 1398 typedef proto::expr<Tag, list10<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9>, 10> type;
Chris@16 1399 typedef proto::basic_expr<Tag, list10<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9>, 10> proto_grammar;
Chris@16 1400 template<typename Expr, typename State, typename Data>
Chris@16 1401 struct impl
Chris@16 1402 : detail::pass_through_impl<nary_expr, deduce_domain, Expr, State, Data>
Chris@16 1403 {};
Chris@16 1404
Chris@16 1405 typedef Tag proto_tag;
Chris@16 1406 typedef A0 proto_child0; typedef A1 proto_child1; typedef A2 proto_child2; typedef A3 proto_child3; typedef A4 proto_child4; typedef A5 proto_child5; typedef A6 proto_child6; typedef A7 proto_child7; typedef A8 proto_child8; typedef A9 proto_child9;
Chris@16 1407
Chris@16 1408 };
Chris@16 1409 namespace detail
Chris@16 1410 {
Chris@16 1411 template<
Chris@16 1412 template<typename , typename , typename , typename , typename , typename , typename , typename , typename , typename> class T
Chris@16 1413 , typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9
Chris@16 1414 >
Chris@16 1415 struct is_callable_<T<A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9> BOOST_PROTO_TEMPLATE_ARITY_PARAM(10)>
Chris@16 1416 : is_same<A9, callable>
Chris@16 1417 {};
Chris@16 1418 }
Chris@16 1419 namespace result_of
Chris@16 1420 {
Chris@16 1421
Chris@16 1422
Chris@16 1423
Chris@16 1424
Chris@16 1425
Chris@16 1426
Chris@16 1427 template<typename Expr>
Chris@16 1428 struct child_c<Expr, 10>
Chris@16 1429 {
Chris@16 1430
Chris@16 1431 BOOST_STATIC_ASSERT(0 != Expr::proto_arity_c);
Chris@16 1432
Chris@16 1433
Chris@16 1434 typedef typename Expr::proto_child10 value_type;
Chris@16 1435
Chris@16 1436
Chris@16 1437
Chris@16 1438
Chris@16 1439
Chris@16 1440 typedef typename detail::expr_traits<typename Expr::proto_child10>::value_type type;
Chris@16 1441 };
Chris@16 1442 template<typename Expr>
Chris@16 1443 struct child_c<Expr &, 10>
Chris@16 1444 {
Chris@16 1445
Chris@16 1446 BOOST_STATIC_ASSERT(0 != Expr::proto_arity_c);
Chris@16 1447
Chris@16 1448
Chris@16 1449 typedef typename Expr::proto_child10 value_type;
Chris@16 1450
Chris@16 1451
Chris@16 1452
Chris@16 1453
Chris@16 1454
Chris@16 1455 typedef typename detail::expr_traits<typename Expr::proto_child10>::reference type;
Chris@16 1456
Chris@16 1457
Chris@16 1458 BOOST_FORCEINLINE
Chris@16 1459 static type call(Expr &e)
Chris@16 1460 {
Chris@16 1461 return e.proto_base().child10;
Chris@16 1462 }
Chris@16 1463 };
Chris@16 1464 template<typename Expr>
Chris@16 1465 struct child_c<Expr const &, 10>
Chris@16 1466 {
Chris@16 1467
Chris@16 1468 BOOST_STATIC_ASSERT(0 != Expr::proto_arity_c);
Chris@16 1469
Chris@16 1470
Chris@16 1471 typedef typename Expr::proto_child10 value_type;
Chris@16 1472
Chris@16 1473
Chris@16 1474
Chris@16 1475
Chris@16 1476
Chris@16 1477 typedef typename detail::expr_traits<typename Expr::proto_child10>::const_reference type;
Chris@16 1478
Chris@16 1479
Chris@16 1480 BOOST_FORCEINLINE
Chris@16 1481 static type call(Expr const &e)
Chris@16 1482 {
Chris@16 1483 return e.proto_base().child10;
Chris@16 1484 }
Chris@16 1485 };
Chris@16 1486 }