1 /////////////////////////////////////////////////////////////////////////////// 2 /// \file expr.hpp 3 /// Contains definition of expr\<\> 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 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 template<typename Tag, typename Arg0> 37 struct expr<Tag, term<Arg0>, 0> 38 { 39 typedef Tag proto_tag; 40 static const long proto_arity_c = 0; 41 typedef mpl::long_<0 > proto_arity; 42 typedef expr proto_base_expr; 43 typedef term<Arg0> proto_args; 44 typedef basic_expr<Tag, proto_args, 0 > proto_grammar; 45 typedef default_domain proto_domain; 46 typedef default_generator proto_generator; 47 typedef proto::tag::proto_expr fusion_tag; 48 typedef expr proto_derived_expr; 49 typedef void proto_is_expr_; 50 typedef Arg0 proto_child0; proto_child0 child0; 51 typedef void proto_child1; typedef void proto_child2; typedef void proto_child3; typedef void proto_child4; typedef void proto_child5; typedef void proto_child6; typedef void proto_child7; typedef void proto_child8; typedef void proto_child9; 52 53 proto_baseexpr54 expr const &proto_base() const 55 { 56 return *this; 57 } 58 59 proto_baseexpr60 expr &proto_base() 61 { 62 return *this; 63 } 64 65 66 67 template<typename A0> makeexpr68 static expr const make(A0 &a0) 69 { 70 return detail::make_terminal(a0, static_cast<expr *>(0), static_cast<proto_args *>(0)); 71 } 72 73 74 template<typename A0> makeexpr75 static expr const make(A0 const &a0) 76 { 77 return detail::make_terminal(a0, static_cast<expr *>(0), static_cast<proto_args *>(0)); 78 } 79 80 81 typedef detail::not_a_valid_type address_of_hack_type_; 82 83 84 85 86 proto::expr< 87 proto::tag::assign 88 , list2<expr &, expr const &> 89 , 2 90 > const operator =expr91 operator =(expr const &a) 92 { 93 proto::expr< 94 proto::tag::assign 95 , list2<expr &, expr const &> 96 , 2 97 > that = {*this, a}; 98 return that; 99 } 100 101 102 103 104 template<typename A> 105 proto::expr< 106 proto::tag::assign 107 , list2<expr const &, typename result_of::as_child<A>::type> 108 , 2 109 > const operator =expr110 operator =(A &a) const 111 { 112 proto::expr< 113 proto::tag::assign 114 , list2<expr const &, typename result_of::as_child<A>::type> 115 , 2 116 > that = {*this, proto::as_child(a)}; 117 return that; 118 } 119 120 121 template<typename A> 122 proto::expr< 123 proto::tag::assign 124 , list2<expr const &, typename result_of::as_child<A const>::type> 125 , 2 126 > const operator =expr127 operator =(A const &a) const 128 { 129 proto::expr< 130 proto::tag::assign 131 , list2<expr const &, typename result_of::as_child<A const>::type> 132 , 2 133 > that = {*this, proto::as_child(a)}; 134 return that; 135 } 136 137 138 template<typename A> 139 proto::expr< 140 proto::tag::assign 141 , list2<expr &, typename result_of::as_child<A>::type> 142 , 2 143 > const operator =expr144 operator =(A &a) 145 { 146 proto::expr< 147 proto::tag::assign 148 , list2<expr &, typename result_of::as_child<A>::type> 149 , 2 150 > that = {*this, proto::as_child(a)}; 151 return that; 152 } 153 154 155 template<typename A> 156 proto::expr< 157 proto::tag::assign 158 , list2<expr &, typename result_of::as_child<A const>::type> 159 , 2 160 > const operator =expr161 operator =(A const &a) 162 { 163 proto::expr< 164 proto::tag::assign 165 , list2<expr &, typename result_of::as_child<A const>::type> 166 , 2 167 > that = {*this, proto::as_child(a)}; 168 return that; 169 } 170 171 172 173 174 template<typename A> 175 proto::expr< 176 proto::tag::subscript 177 , list2<expr const &, typename result_of::as_child<A>::type> 178 , 2 179 > const operator []expr180 operator [](A &a) const 181 { 182 proto::expr< 183 proto::tag::subscript 184 , list2<expr const &, typename result_of::as_child<A>::type> 185 , 2 186 > that = {*this, proto::as_child(a)}; 187 return that; 188 } 189 190 191 template<typename A> 192 proto::expr< 193 proto::tag::subscript 194 , list2<expr const &, typename result_of::as_child<A const>::type> 195 , 2 196 > const operator []expr197 operator [](A const &a) const 198 { 199 proto::expr< 200 proto::tag::subscript 201 , list2<expr const &, typename result_of::as_child<A const>::type> 202 , 2 203 > that = {*this, proto::as_child(a)}; 204 return that; 205 } 206 207 208 template<typename A> 209 proto::expr< 210 proto::tag::subscript 211 , list2<expr &, typename result_of::as_child<A>::type> 212 , 2 213 > const operator []expr214 operator [](A &a) 215 { 216 proto::expr< 217 proto::tag::subscript 218 , list2<expr &, typename result_of::as_child<A>::type> 219 , 2 220 > that = {*this, proto::as_child(a)}; 221 return that; 222 } 223 224 225 template<typename A> 226 proto::expr< 227 proto::tag::subscript 228 , list2<expr &, typename result_of::as_child<A const>::type> 229 , 2 230 > const operator []expr231 operator [](A const &a) 232 { 233 proto::expr< 234 proto::tag::subscript 235 , list2<expr &, typename result_of::as_child<A const>::type> 236 , 2 237 > that = {*this, proto::as_child(a)}; 238 return that; 239 } 240 241 242 template<typename Sig> 243 struct result 244 { 245 typedef typename result_of::funop<Sig, expr, default_domain>::type const type; 246 }; 247 248 249 250 proto::expr<proto::tag::function, list1<expr const &>, 1> const operator ()expr251 operator ()() const 252 { 253 proto::expr<proto::tag::function, list1<expr const &>, 1> that = {*this}; 254 return that; 255 } 256 257 258 proto::expr<proto::tag::function, list1<expr &>, 1> const operator ()expr259 operator ()() 260 { 261 proto::expr<proto::tag::function, list1<expr &>, 1> that = {*this}; 262 return that; 263 } 264 265 266 template<typename A0> 267 typename result_of::funop1< 268 expr const 269 , default_domain , const A0 270 >::type const operator ()expr271 operator ()(A0 const &a0) const 272 { 273 return result_of::funop1< 274 expr const 275 , default_domain , const A0 276 >::call(*this , a0); 277 } 278 279 280 template<typename A0> 281 typename result_of::funop1< 282 expr 283 , default_domain , const A0 284 >::type const operator ()expr285 operator ()(A0 const &a0) 286 { 287 return result_of::funop1< 288 expr 289 , default_domain , const A0 290 >::call(*this , a0); 291 } 292 293 294 template<typename A0 , typename A1> 295 typename result_of::funop2< 296 expr const 297 , default_domain , const A0 , const A1 298 >::type const operator ()expr299 operator ()(A0 const &a0 , A1 const &a1) const 300 { 301 return result_of::funop2< 302 expr const 303 , default_domain , const A0 , const A1 304 >::call(*this , a0 , a1); 305 } 306 307 308 template<typename A0 , typename A1> 309 typename result_of::funop2< 310 expr 311 , default_domain , const A0 , const A1 312 >::type const operator ()expr313 operator ()(A0 const &a0 , A1 const &a1) 314 { 315 return result_of::funop2< 316 expr 317 , default_domain , const A0 , const A1 318 >::call(*this , a0 , a1); 319 } 320 321 322 template<typename A0 , typename A1 , typename A2> 323 typename result_of::funop3< 324 expr const 325 , default_domain , const A0 , const A1 , const A2 326 >::type const operator ()expr327 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2) const 328 { 329 return result_of::funop3< 330 expr const 331 , default_domain , const A0 , const A1 , const A2 332 >::call(*this , a0 , a1 , a2); 333 } 334 335 336 template<typename A0 , typename A1 , typename A2> 337 typename result_of::funop3< 338 expr 339 , default_domain , const A0 , const A1 , const A2 340 >::type const operator ()expr341 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2) 342 { 343 return result_of::funop3< 344 expr 345 , default_domain , const A0 , const A1 , const A2 346 >::call(*this , a0 , a1 , a2); 347 } 348 349 350 template<typename A0 , typename A1 , typename A2 , typename A3> 351 typename result_of::funop4< 352 expr const 353 , default_domain , const A0 , const A1 , const A2 , const A3 354 >::type const operator ()expr355 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) const 356 { 357 return result_of::funop4< 358 expr const 359 , default_domain , const A0 , const A1 , const A2 , const A3 360 >::call(*this , a0 , a1 , a2 , a3); 361 } 362 363 364 template<typename A0 , typename A1 , typename A2 , typename A3> 365 typename result_of::funop4< 366 expr 367 , default_domain , const A0 , const A1 , const A2 , const A3 368 >::type const operator ()expr369 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) 370 { 371 return result_of::funop4< 372 expr 373 , default_domain , const A0 , const A1 , const A2 , const A3 374 >::call(*this , a0 , a1 , a2 , a3); 375 } 376 377 378 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4> 379 typename result_of::funop5< 380 expr const 381 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 382 >::type const operator ()expr383 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) const 384 { 385 return result_of::funop5< 386 expr const 387 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 388 >::call(*this , a0 , a1 , a2 , a3 , a4); 389 } 390 391 392 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4> 393 typename result_of::funop5< 394 expr 395 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 396 >::type const operator ()expr397 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) 398 { 399 return result_of::funop5< 400 expr 401 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 402 >::call(*this , a0 , a1 , a2 , a3 , a4); 403 } 404 405 406 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5> 407 typename result_of::funop6< 408 expr const 409 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 410 >::type const operator ()expr411 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) const 412 { 413 return result_of::funop6< 414 expr const 415 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 416 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5); 417 } 418 419 420 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5> 421 typename result_of::funop6< 422 expr 423 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 424 >::type const operator ()expr425 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) 426 { 427 return result_of::funop6< 428 expr 429 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 430 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5); 431 } 432 433 434 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6> 435 typename result_of::funop7< 436 expr const 437 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 438 >::type const operator ()expr439 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) const 440 { 441 return result_of::funop7< 442 expr const 443 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 444 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6); 445 } 446 447 448 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6> 449 typename result_of::funop7< 450 expr 451 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 452 >::type const operator ()expr453 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) 454 { 455 return result_of::funop7< 456 expr 457 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 458 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6); 459 } 460 461 462 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7> 463 typename result_of::funop8< 464 expr const 465 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 466 >::type const operator ()expr467 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) const 468 { 469 return result_of::funop8< 470 expr const 471 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 472 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7); 473 } 474 475 476 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7> 477 typename result_of::funop8< 478 expr 479 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 480 >::type const operator ()expr481 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) 482 { 483 return result_of::funop8< 484 expr 485 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 486 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7); 487 } 488 489 490 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8> 491 typename result_of::funop9< 492 expr const 493 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8 494 >::type const operator ()expr495 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) const 496 { 497 return result_of::funop9< 498 expr const 499 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8 500 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8); 501 } 502 503 504 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8> 505 typename result_of::funop9< 506 expr 507 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8 508 >::type const operator ()expr509 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) 510 { 511 return result_of::funop9< 512 expr 513 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8 514 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8); 515 } 516 }; 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 template<typename Tag , typename Arg0> 545 struct expr<Tag, list1<Arg0>, 1 > 546 { 547 typedef Tag proto_tag; 548 static const long proto_arity_c = 1; 549 typedef mpl::long_<1 > proto_arity; 550 typedef expr proto_base_expr; 551 typedef list1<Arg0> proto_args; 552 typedef basic_expr<Tag, proto_args, 1 > proto_grammar; 553 typedef default_domain proto_domain; 554 typedef default_generator proto_generator; 555 typedef proto::tag::proto_expr fusion_tag; 556 typedef expr proto_derived_expr; 557 typedef void proto_is_expr_; 558 typedef Arg0 proto_child0; proto_child0 child0; 559 typedef void proto_child1; typedef void proto_child2; typedef void proto_child3; typedef void proto_child4; typedef void proto_child5; typedef void proto_child6; typedef void proto_child7; typedef void proto_child8; typedef void proto_child9; 560 561 proto_baseexpr562 expr const &proto_base() const 563 { 564 return *this; 565 } 566 567 proto_baseexpr568 expr &proto_base() 569 { 570 return *this; 571 } 572 573 574 575 template<typename A0> makeexpr576 static expr const make(A0 const &a0) 577 { 578 expr that = {a0}; 579 return that; 580 } 581 582 583 584 typedef typename detail::address_of_hack<Tag, proto_child0>::type address_of_hack_type_; 585 586 587 588 589 590 591 operator address_of_hack_type_expr592 operator address_of_hack_type_() const 593 { 594 return boost::addressof(this->child0); 595 } 596 597 598 599 600 proto::expr< 601 proto::tag::assign 602 , list2<expr &, expr const &> 603 , 2 604 > const operator =expr605 operator =(expr const &a) 606 { 607 proto::expr< 608 proto::tag::assign 609 , list2<expr &, expr const &> 610 , 2 611 > that = {*this, a}; 612 return that; 613 } 614 615 616 617 618 template<typename A> 619 proto::expr< 620 proto::tag::assign 621 , list2<expr const &, typename result_of::as_child<A>::type> 622 , 2 623 > const operator =expr624 operator =(A &a) const 625 { 626 proto::expr< 627 proto::tag::assign 628 , list2<expr const &, typename result_of::as_child<A>::type> 629 , 2 630 > that = {*this, proto::as_child(a)}; 631 return that; 632 } 633 634 635 template<typename A> 636 proto::expr< 637 proto::tag::assign 638 , list2<expr const &, typename result_of::as_child<A const>::type> 639 , 2 640 > const operator =expr641 operator =(A const &a) const 642 { 643 proto::expr< 644 proto::tag::assign 645 , list2<expr const &, typename result_of::as_child<A const>::type> 646 , 2 647 > that = {*this, proto::as_child(a)}; 648 return that; 649 } 650 651 652 653 654 template<typename A> 655 proto::expr< 656 proto::tag::subscript 657 , list2<expr const &, typename result_of::as_child<A>::type> 658 , 2 659 > const operator []expr660 operator [](A &a) const 661 { 662 proto::expr< 663 proto::tag::subscript 664 , list2<expr const &, typename result_of::as_child<A>::type> 665 , 2 666 > that = {*this, proto::as_child(a)}; 667 return that; 668 } 669 670 671 template<typename A> 672 proto::expr< 673 proto::tag::subscript 674 , list2<expr const &, typename result_of::as_child<A const>::type> 675 , 2 676 > const operator []expr677 operator [](A const &a) const 678 { 679 proto::expr< 680 proto::tag::subscript 681 , list2<expr const &, typename result_of::as_child<A const>::type> 682 , 2 683 > that = {*this, proto::as_child(a)}; 684 return that; 685 } 686 687 688 template<typename Sig> 689 struct result 690 { 691 typedef typename result_of::funop<Sig, expr, default_domain>::type const type; 692 }; 693 694 695 696 proto::expr<proto::tag::function, list1<expr const &>, 1> const operator ()expr697 operator ()() const 698 { 699 proto::expr<proto::tag::function, list1<expr const &>, 1> that = {*this}; 700 return that; 701 } 702 703 704 template<typename A0> 705 typename result_of::funop1< 706 expr const 707 , default_domain , const A0 708 >::type const operator ()expr709 operator ()(A0 const &a0) const 710 { 711 return result_of::funop1< 712 expr const 713 , default_domain , const A0 714 >::call(*this , a0); 715 } 716 717 718 template<typename A0 , typename A1> 719 typename result_of::funop2< 720 expr const 721 , default_domain , const A0 , const A1 722 >::type const operator ()expr723 operator ()(A0 const &a0 , A1 const &a1) const 724 { 725 return result_of::funop2< 726 expr const 727 , default_domain , const A0 , const A1 728 >::call(*this , a0 , a1); 729 } 730 731 732 template<typename A0 , typename A1 , typename A2> 733 typename result_of::funop3< 734 expr const 735 , default_domain , const A0 , const A1 , const A2 736 >::type const operator ()expr737 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2) const 738 { 739 return result_of::funop3< 740 expr const 741 , default_domain , const A0 , const A1 , const A2 742 >::call(*this , a0 , a1 , a2); 743 } 744 745 746 template<typename A0 , typename A1 , typename A2 , typename A3> 747 typename result_of::funop4< 748 expr const 749 , default_domain , const A0 , const A1 , const A2 , const A3 750 >::type const operator ()expr751 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) const 752 { 753 return result_of::funop4< 754 expr const 755 , default_domain , const A0 , const A1 , const A2 , const A3 756 >::call(*this , a0 , a1 , a2 , a3); 757 } 758 759 760 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4> 761 typename result_of::funop5< 762 expr const 763 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 764 >::type const operator ()expr765 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) const 766 { 767 return result_of::funop5< 768 expr const 769 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 770 >::call(*this , a0 , a1 , a2 , a3 , a4); 771 } 772 773 774 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5> 775 typename result_of::funop6< 776 expr const 777 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 778 >::type const operator ()expr779 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) const 780 { 781 return result_of::funop6< 782 expr const 783 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 784 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5); 785 } 786 787 788 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6> 789 typename result_of::funop7< 790 expr const 791 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 792 >::type const operator ()expr793 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) const 794 { 795 return result_of::funop7< 796 expr const 797 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 798 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6); 799 } 800 801 802 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7> 803 typename result_of::funop8< 804 expr const 805 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 806 >::type const operator ()expr807 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) const 808 { 809 return result_of::funop8< 810 expr const 811 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 812 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7); 813 } 814 815 816 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8> 817 typename result_of::funop9< 818 expr const 819 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8 820 >::type const operator ()expr821 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) const 822 { 823 return result_of::funop9< 824 expr const 825 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8 826 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8); 827 } 828 }; 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 template<typename Tag , typename Arg0 , typename Arg1> 857 struct expr<Tag, list2<Arg0 , Arg1>, 2 > 858 { 859 typedef Tag proto_tag; 860 static const long proto_arity_c = 2; 861 typedef mpl::long_<2 > proto_arity; 862 typedef expr proto_base_expr; 863 typedef list2<Arg0 , Arg1> proto_args; 864 typedef basic_expr<Tag, proto_args, 2 > proto_grammar; 865 typedef default_domain proto_domain; 866 typedef default_generator proto_generator; 867 typedef proto::tag::proto_expr fusion_tag; 868 typedef expr proto_derived_expr; 869 typedef void proto_is_expr_; 870 typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; 871 typedef void proto_child2; typedef void proto_child3; typedef void proto_child4; typedef void proto_child5; typedef void proto_child6; typedef void proto_child7; typedef void proto_child8; typedef void proto_child9; 872 873 proto_baseexpr874 expr const &proto_base() const 875 { 876 return *this; 877 } 878 879 proto_baseexpr880 expr &proto_base() 881 { 882 return *this; 883 } 884 885 886 887 template<typename A0 , typename A1> makeexpr888 static expr const make(A0 const &a0 , A1 const &a1) 889 { 890 expr that = {a0 , a1}; 891 return that; 892 } 893 894 895 typedef detail::not_a_valid_type address_of_hack_type_; 896 897 898 899 900 proto::expr< 901 proto::tag::assign 902 , list2<expr &, expr const &> 903 , 2 904 > const operator =expr905 operator =(expr const &a) 906 { 907 proto::expr< 908 proto::tag::assign 909 , list2<expr &, expr const &> 910 , 2 911 > that = {*this, a}; 912 return that; 913 } 914 915 916 917 918 template<typename A> 919 proto::expr< 920 proto::tag::assign 921 , list2<expr const &, typename result_of::as_child<A>::type> 922 , 2 923 > const operator =expr924 operator =(A &a) const 925 { 926 proto::expr< 927 proto::tag::assign 928 , list2<expr const &, typename result_of::as_child<A>::type> 929 , 2 930 > that = {*this, proto::as_child(a)}; 931 return that; 932 } 933 934 935 template<typename A> 936 proto::expr< 937 proto::tag::assign 938 , list2<expr const &, typename result_of::as_child<A const>::type> 939 , 2 940 > const operator =expr941 operator =(A const &a) const 942 { 943 proto::expr< 944 proto::tag::assign 945 , list2<expr const &, typename result_of::as_child<A const>::type> 946 , 2 947 > that = {*this, proto::as_child(a)}; 948 return that; 949 } 950 951 952 953 954 template<typename A> 955 proto::expr< 956 proto::tag::subscript 957 , list2<expr const &, typename result_of::as_child<A>::type> 958 , 2 959 > const operator []expr960 operator [](A &a) const 961 { 962 proto::expr< 963 proto::tag::subscript 964 , list2<expr const &, typename result_of::as_child<A>::type> 965 , 2 966 > that = {*this, proto::as_child(a)}; 967 return that; 968 } 969 970 971 template<typename A> 972 proto::expr< 973 proto::tag::subscript 974 , list2<expr const &, typename result_of::as_child<A const>::type> 975 , 2 976 > const operator []expr977 operator [](A const &a) const 978 { 979 proto::expr< 980 proto::tag::subscript 981 , list2<expr const &, typename result_of::as_child<A const>::type> 982 , 2 983 > that = {*this, proto::as_child(a)}; 984 return that; 985 } 986 987 988 template<typename Sig> 989 struct result 990 { 991 typedef typename result_of::funop<Sig, expr, default_domain>::type const type; 992 }; 993 994 995 996 proto::expr<proto::tag::function, list1<expr const &>, 1> const operator ()expr997 operator ()() const 998 { 999 proto::expr<proto::tag::function, list1<expr const &>, 1> that = {*this}; 1000 return that; 1001 } 1002 1003 1004 template<typename A0> 1005 typename result_of::funop1< 1006 expr const 1007 , default_domain , const A0 1008 >::type const operator ()expr1009 operator ()(A0 const &a0) const 1010 { 1011 return result_of::funop1< 1012 expr const 1013 , default_domain , const A0 1014 >::call(*this , a0); 1015 } 1016 1017 1018 template<typename A0 , typename A1> 1019 typename result_of::funop2< 1020 expr const 1021 , default_domain , const A0 , const A1 1022 >::type const operator ()expr1023 operator ()(A0 const &a0 , A1 const &a1) const 1024 { 1025 return result_of::funop2< 1026 expr const 1027 , default_domain , const A0 , const A1 1028 >::call(*this , a0 , a1); 1029 } 1030 1031 1032 template<typename A0 , typename A1 , typename A2> 1033 typename result_of::funop3< 1034 expr const 1035 , default_domain , const A0 , const A1 , const A2 1036 >::type const operator ()expr1037 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2) const 1038 { 1039 return result_of::funop3< 1040 expr const 1041 , default_domain , const A0 , const A1 , const A2 1042 >::call(*this , a0 , a1 , a2); 1043 } 1044 1045 1046 template<typename A0 , typename A1 , typename A2 , typename A3> 1047 typename result_of::funop4< 1048 expr const 1049 , default_domain , const A0 , const A1 , const A2 , const A3 1050 >::type const operator ()expr1051 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) const 1052 { 1053 return result_of::funop4< 1054 expr const 1055 , default_domain , const A0 , const A1 , const A2 , const A3 1056 >::call(*this , a0 , a1 , a2 , a3); 1057 } 1058 1059 1060 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4> 1061 typename result_of::funop5< 1062 expr const 1063 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 1064 >::type const operator ()expr1065 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) const 1066 { 1067 return result_of::funop5< 1068 expr const 1069 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 1070 >::call(*this , a0 , a1 , a2 , a3 , a4); 1071 } 1072 1073 1074 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5> 1075 typename result_of::funop6< 1076 expr const 1077 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 1078 >::type const operator ()expr1079 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) const 1080 { 1081 return result_of::funop6< 1082 expr const 1083 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 1084 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5); 1085 } 1086 1087 1088 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6> 1089 typename result_of::funop7< 1090 expr const 1091 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 1092 >::type const operator ()expr1093 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) const 1094 { 1095 return result_of::funop7< 1096 expr const 1097 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 1098 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6); 1099 } 1100 1101 1102 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7> 1103 typename result_of::funop8< 1104 expr const 1105 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 1106 >::type const operator ()expr1107 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) const 1108 { 1109 return result_of::funop8< 1110 expr const 1111 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 1112 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7); 1113 } 1114 1115 1116 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8> 1117 typename result_of::funop9< 1118 expr const 1119 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8 1120 >::type const operator ()expr1121 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) const 1122 { 1123 return result_of::funop9< 1124 expr const 1125 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8 1126 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8); 1127 } 1128 }; 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2> 1157 struct expr<Tag, list3<Arg0 , Arg1 , Arg2>, 3 > 1158 { 1159 typedef Tag proto_tag; 1160 static const long proto_arity_c = 3; 1161 typedef mpl::long_<3 > proto_arity; 1162 typedef expr proto_base_expr; 1163 typedef list3<Arg0 , Arg1 , Arg2> proto_args; 1164 typedef basic_expr<Tag, proto_args, 3 > proto_grammar; 1165 typedef default_domain proto_domain; 1166 typedef default_generator proto_generator; 1167 typedef proto::tag::proto_expr fusion_tag; 1168 typedef expr proto_derived_expr; 1169 typedef void proto_is_expr_; 1170 typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; typedef Arg2 proto_child2; proto_child2 child2; 1171 typedef void proto_child3; typedef void proto_child4; typedef void proto_child5; typedef void proto_child6; typedef void proto_child7; typedef void proto_child8; typedef void proto_child9; 1172 1173 proto_baseexpr1174 expr const &proto_base() const 1175 { 1176 return *this; 1177 } 1178 1179 proto_baseexpr1180 expr &proto_base() 1181 { 1182 return *this; 1183 } 1184 1185 1186 1187 template<typename A0 , typename A1 , typename A2> makeexpr1188 static expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2) 1189 { 1190 expr that = {a0 , a1 , a2}; 1191 return that; 1192 } 1193 1194 1195 typedef detail::not_a_valid_type address_of_hack_type_; 1196 1197 1198 1199 1200 proto::expr< 1201 proto::tag::assign 1202 , list2<expr &, expr const &> 1203 , 2 1204 > const operator =expr1205 operator =(expr const &a) 1206 { 1207 proto::expr< 1208 proto::tag::assign 1209 , list2<expr &, expr const &> 1210 , 2 1211 > that = {*this, a}; 1212 return that; 1213 } 1214 1215 1216 1217 1218 template<typename A> 1219 proto::expr< 1220 proto::tag::assign 1221 , list2<expr const &, typename result_of::as_child<A>::type> 1222 , 2 1223 > const operator =expr1224 operator =(A &a) const 1225 { 1226 proto::expr< 1227 proto::tag::assign 1228 , list2<expr const &, typename result_of::as_child<A>::type> 1229 , 2 1230 > that = {*this, proto::as_child(a)}; 1231 return that; 1232 } 1233 1234 1235 template<typename A> 1236 proto::expr< 1237 proto::tag::assign 1238 , list2<expr const &, typename result_of::as_child<A const>::type> 1239 , 2 1240 > const operator =expr1241 operator =(A const &a) const 1242 { 1243 proto::expr< 1244 proto::tag::assign 1245 , list2<expr const &, typename result_of::as_child<A const>::type> 1246 , 2 1247 > that = {*this, proto::as_child(a)}; 1248 return that; 1249 } 1250 1251 1252 1253 1254 template<typename A> 1255 proto::expr< 1256 proto::tag::subscript 1257 , list2<expr const &, typename result_of::as_child<A>::type> 1258 , 2 1259 > const operator []expr1260 operator [](A &a) const 1261 { 1262 proto::expr< 1263 proto::tag::subscript 1264 , list2<expr const &, typename result_of::as_child<A>::type> 1265 , 2 1266 > that = {*this, proto::as_child(a)}; 1267 return that; 1268 } 1269 1270 1271 template<typename A> 1272 proto::expr< 1273 proto::tag::subscript 1274 , list2<expr const &, typename result_of::as_child<A const>::type> 1275 , 2 1276 > const operator []expr1277 operator [](A const &a) const 1278 { 1279 proto::expr< 1280 proto::tag::subscript 1281 , list2<expr const &, typename result_of::as_child<A const>::type> 1282 , 2 1283 > that = {*this, proto::as_child(a)}; 1284 return that; 1285 } 1286 1287 1288 template<typename Sig> 1289 struct result 1290 { 1291 typedef typename result_of::funop<Sig, expr, default_domain>::type const type; 1292 }; 1293 1294 1295 1296 proto::expr<proto::tag::function, list1<expr const &>, 1> const operator ()expr1297 operator ()() const 1298 { 1299 proto::expr<proto::tag::function, list1<expr const &>, 1> that = {*this}; 1300 return that; 1301 } 1302 1303 1304 template<typename A0> 1305 typename result_of::funop1< 1306 expr const 1307 , default_domain , const A0 1308 >::type const operator ()expr1309 operator ()(A0 const &a0) const 1310 { 1311 return result_of::funop1< 1312 expr const 1313 , default_domain , const A0 1314 >::call(*this , a0); 1315 } 1316 1317 1318 template<typename A0 , typename A1> 1319 typename result_of::funop2< 1320 expr const 1321 , default_domain , const A0 , const A1 1322 >::type const operator ()expr1323 operator ()(A0 const &a0 , A1 const &a1) const 1324 { 1325 return result_of::funop2< 1326 expr const 1327 , default_domain , const A0 , const A1 1328 >::call(*this , a0 , a1); 1329 } 1330 1331 1332 template<typename A0 , typename A1 , typename A2> 1333 typename result_of::funop3< 1334 expr const 1335 , default_domain , const A0 , const A1 , const A2 1336 >::type const operator ()expr1337 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2) const 1338 { 1339 return result_of::funop3< 1340 expr const 1341 , default_domain , const A0 , const A1 , const A2 1342 >::call(*this , a0 , a1 , a2); 1343 } 1344 1345 1346 template<typename A0 , typename A1 , typename A2 , typename A3> 1347 typename result_of::funop4< 1348 expr const 1349 , default_domain , const A0 , const A1 , const A2 , const A3 1350 >::type const operator ()expr1351 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) const 1352 { 1353 return result_of::funop4< 1354 expr const 1355 , default_domain , const A0 , const A1 , const A2 , const A3 1356 >::call(*this , a0 , a1 , a2 , a3); 1357 } 1358 1359 1360 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4> 1361 typename result_of::funop5< 1362 expr const 1363 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 1364 >::type const operator ()expr1365 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) const 1366 { 1367 return result_of::funop5< 1368 expr const 1369 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 1370 >::call(*this , a0 , a1 , a2 , a3 , a4); 1371 } 1372 1373 1374 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5> 1375 typename result_of::funop6< 1376 expr const 1377 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 1378 >::type const operator ()expr1379 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) const 1380 { 1381 return result_of::funop6< 1382 expr const 1383 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 1384 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5); 1385 } 1386 1387 1388 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6> 1389 typename result_of::funop7< 1390 expr const 1391 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 1392 >::type const operator ()expr1393 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) const 1394 { 1395 return result_of::funop7< 1396 expr const 1397 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 1398 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6); 1399 } 1400 1401 1402 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7> 1403 typename result_of::funop8< 1404 expr const 1405 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 1406 >::type const operator ()expr1407 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) const 1408 { 1409 return result_of::funop8< 1410 expr const 1411 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 1412 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7); 1413 } 1414 1415 1416 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8> 1417 typename result_of::funop9< 1418 expr const 1419 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8 1420 >::type const operator ()expr1421 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) const 1422 { 1423 return result_of::funop9< 1424 expr const 1425 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8 1426 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8); 1427 } 1428 }; 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3> 1457 struct expr<Tag, list4<Arg0 , Arg1 , Arg2 , Arg3>, 4 > 1458 { 1459 typedef Tag proto_tag; 1460 static const long proto_arity_c = 4; 1461 typedef mpl::long_<4 > proto_arity; 1462 typedef expr proto_base_expr; 1463 typedef list4<Arg0 , Arg1 , Arg2 , Arg3> proto_args; 1464 typedef basic_expr<Tag, proto_args, 4 > proto_grammar; 1465 typedef default_domain proto_domain; 1466 typedef default_generator proto_generator; 1467 typedef proto::tag::proto_expr fusion_tag; 1468 typedef expr proto_derived_expr; 1469 typedef void proto_is_expr_; 1470 typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; typedef Arg2 proto_child2; proto_child2 child2; typedef Arg3 proto_child3; proto_child3 child3; 1471 typedef void proto_child4; typedef void proto_child5; typedef void proto_child6; typedef void proto_child7; typedef void proto_child8; typedef void proto_child9; 1472 1473 proto_baseexpr1474 expr const &proto_base() const 1475 { 1476 return *this; 1477 } 1478 1479 proto_baseexpr1480 expr &proto_base() 1481 { 1482 return *this; 1483 } 1484 1485 1486 1487 template<typename A0 , typename A1 , typename A2 , typename A3> makeexpr1488 static expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) 1489 { 1490 expr that = {a0 , a1 , a2 , a3}; 1491 return that; 1492 } 1493 1494 1495 typedef detail::not_a_valid_type address_of_hack_type_; 1496 1497 1498 1499 1500 proto::expr< 1501 proto::tag::assign 1502 , list2<expr &, expr const &> 1503 , 2 1504 > const operator =expr1505 operator =(expr const &a) 1506 { 1507 proto::expr< 1508 proto::tag::assign 1509 , list2<expr &, expr const &> 1510 , 2 1511 > that = {*this, a}; 1512 return that; 1513 } 1514 1515 1516 1517 1518 template<typename A> 1519 proto::expr< 1520 proto::tag::assign 1521 , list2<expr const &, typename result_of::as_child<A>::type> 1522 , 2 1523 > const operator =expr1524 operator =(A &a) const 1525 { 1526 proto::expr< 1527 proto::tag::assign 1528 , list2<expr const &, typename result_of::as_child<A>::type> 1529 , 2 1530 > that = {*this, proto::as_child(a)}; 1531 return that; 1532 } 1533 1534 1535 template<typename A> 1536 proto::expr< 1537 proto::tag::assign 1538 , list2<expr const &, typename result_of::as_child<A const>::type> 1539 , 2 1540 > const operator =expr1541 operator =(A const &a) const 1542 { 1543 proto::expr< 1544 proto::tag::assign 1545 , list2<expr const &, typename result_of::as_child<A const>::type> 1546 , 2 1547 > that = {*this, proto::as_child(a)}; 1548 return that; 1549 } 1550 1551 1552 1553 1554 template<typename A> 1555 proto::expr< 1556 proto::tag::subscript 1557 , list2<expr const &, typename result_of::as_child<A>::type> 1558 , 2 1559 > const operator []expr1560 operator [](A &a) const 1561 { 1562 proto::expr< 1563 proto::tag::subscript 1564 , list2<expr const &, typename result_of::as_child<A>::type> 1565 , 2 1566 > that = {*this, proto::as_child(a)}; 1567 return that; 1568 } 1569 1570 1571 template<typename A> 1572 proto::expr< 1573 proto::tag::subscript 1574 , list2<expr const &, typename result_of::as_child<A const>::type> 1575 , 2 1576 > const operator []expr1577 operator [](A const &a) const 1578 { 1579 proto::expr< 1580 proto::tag::subscript 1581 , list2<expr const &, typename result_of::as_child<A const>::type> 1582 , 2 1583 > that = {*this, proto::as_child(a)}; 1584 return that; 1585 } 1586 1587 1588 template<typename Sig> 1589 struct result 1590 { 1591 typedef typename result_of::funop<Sig, expr, default_domain>::type const type; 1592 }; 1593 1594 1595 1596 proto::expr<proto::tag::function, list1<expr const &>, 1> const operator ()expr1597 operator ()() const 1598 { 1599 proto::expr<proto::tag::function, list1<expr const &>, 1> that = {*this}; 1600 return that; 1601 } 1602 1603 1604 template<typename A0> 1605 typename result_of::funop1< 1606 expr const 1607 , default_domain , const A0 1608 >::type const operator ()expr1609 operator ()(A0 const &a0) const 1610 { 1611 return result_of::funop1< 1612 expr const 1613 , default_domain , const A0 1614 >::call(*this , a0); 1615 } 1616 1617 1618 template<typename A0 , typename A1> 1619 typename result_of::funop2< 1620 expr const 1621 , default_domain , const A0 , const A1 1622 >::type const operator ()expr1623 operator ()(A0 const &a0 , A1 const &a1) const 1624 { 1625 return result_of::funop2< 1626 expr const 1627 , default_domain , const A0 , const A1 1628 >::call(*this , a0 , a1); 1629 } 1630 1631 1632 template<typename A0 , typename A1 , typename A2> 1633 typename result_of::funop3< 1634 expr const 1635 , default_domain , const A0 , const A1 , const A2 1636 >::type const operator ()expr1637 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2) const 1638 { 1639 return result_of::funop3< 1640 expr const 1641 , default_domain , const A0 , const A1 , const A2 1642 >::call(*this , a0 , a1 , a2); 1643 } 1644 1645 1646 template<typename A0 , typename A1 , typename A2 , typename A3> 1647 typename result_of::funop4< 1648 expr const 1649 , default_domain , const A0 , const A1 , const A2 , const A3 1650 >::type const operator ()expr1651 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) const 1652 { 1653 return result_of::funop4< 1654 expr const 1655 , default_domain , const A0 , const A1 , const A2 , const A3 1656 >::call(*this , a0 , a1 , a2 , a3); 1657 } 1658 1659 1660 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4> 1661 typename result_of::funop5< 1662 expr const 1663 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 1664 >::type const operator ()expr1665 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) const 1666 { 1667 return result_of::funop5< 1668 expr const 1669 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 1670 >::call(*this , a0 , a1 , a2 , a3 , a4); 1671 } 1672 1673 1674 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5> 1675 typename result_of::funop6< 1676 expr const 1677 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 1678 >::type const operator ()expr1679 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) const 1680 { 1681 return result_of::funop6< 1682 expr const 1683 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 1684 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5); 1685 } 1686 1687 1688 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6> 1689 typename result_of::funop7< 1690 expr const 1691 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 1692 >::type const operator ()expr1693 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) const 1694 { 1695 return result_of::funop7< 1696 expr const 1697 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 1698 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6); 1699 } 1700 1701 1702 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7> 1703 typename result_of::funop8< 1704 expr const 1705 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 1706 >::type const operator ()expr1707 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) const 1708 { 1709 return result_of::funop8< 1710 expr const 1711 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 1712 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7); 1713 } 1714 1715 1716 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8> 1717 typename result_of::funop9< 1718 expr const 1719 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8 1720 >::type const operator ()expr1721 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) const 1722 { 1723 return result_of::funop9< 1724 expr const 1725 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8 1726 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8); 1727 } 1728 }; 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4> 1757 struct expr<Tag, list5<Arg0 , Arg1 , Arg2 , Arg3 , Arg4>, 5 > 1758 { 1759 typedef Tag proto_tag; 1760 static const long proto_arity_c = 5; 1761 typedef mpl::long_<5 > proto_arity; 1762 typedef expr proto_base_expr; 1763 typedef list5<Arg0 , Arg1 , Arg2 , Arg3 , Arg4> proto_args; 1764 typedef basic_expr<Tag, proto_args, 5 > proto_grammar; 1765 typedef default_domain proto_domain; 1766 typedef default_generator proto_generator; 1767 typedef proto::tag::proto_expr fusion_tag; 1768 typedef expr proto_derived_expr; 1769 typedef void proto_is_expr_; 1770 typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; typedef Arg2 proto_child2; proto_child2 child2; typedef Arg3 proto_child3; proto_child3 child3; typedef Arg4 proto_child4; proto_child4 child4; 1771 typedef void proto_child5; typedef void proto_child6; typedef void proto_child7; typedef void proto_child8; typedef void proto_child9; 1772 1773 proto_baseexpr1774 expr const &proto_base() const 1775 { 1776 return *this; 1777 } 1778 1779 proto_baseexpr1780 expr &proto_base() 1781 { 1782 return *this; 1783 } 1784 1785 1786 1787 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4> makeexpr1788 static expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) 1789 { 1790 expr that = {a0 , a1 , a2 , a3 , a4}; 1791 return that; 1792 } 1793 1794 1795 typedef detail::not_a_valid_type address_of_hack_type_; 1796 1797 1798 1799 1800 proto::expr< 1801 proto::tag::assign 1802 , list2<expr &, expr const &> 1803 , 2 1804 > const operator =expr1805 operator =(expr const &a) 1806 { 1807 proto::expr< 1808 proto::tag::assign 1809 , list2<expr &, expr const &> 1810 , 2 1811 > that = {*this, a}; 1812 return that; 1813 } 1814 1815 1816 1817 1818 template<typename A> 1819 proto::expr< 1820 proto::tag::assign 1821 , list2<expr const &, typename result_of::as_child<A>::type> 1822 , 2 1823 > const operator =expr1824 operator =(A &a) const 1825 { 1826 proto::expr< 1827 proto::tag::assign 1828 , list2<expr const &, typename result_of::as_child<A>::type> 1829 , 2 1830 > that = {*this, proto::as_child(a)}; 1831 return that; 1832 } 1833 1834 1835 template<typename A> 1836 proto::expr< 1837 proto::tag::assign 1838 , list2<expr const &, typename result_of::as_child<A const>::type> 1839 , 2 1840 > const operator =expr1841 operator =(A const &a) const 1842 { 1843 proto::expr< 1844 proto::tag::assign 1845 , list2<expr const &, typename result_of::as_child<A const>::type> 1846 , 2 1847 > that = {*this, proto::as_child(a)}; 1848 return that; 1849 } 1850 1851 1852 1853 1854 template<typename A> 1855 proto::expr< 1856 proto::tag::subscript 1857 , list2<expr const &, typename result_of::as_child<A>::type> 1858 , 2 1859 > const operator []expr1860 operator [](A &a) const 1861 { 1862 proto::expr< 1863 proto::tag::subscript 1864 , list2<expr const &, typename result_of::as_child<A>::type> 1865 , 2 1866 > that = {*this, proto::as_child(a)}; 1867 return that; 1868 } 1869 1870 1871 template<typename A> 1872 proto::expr< 1873 proto::tag::subscript 1874 , list2<expr const &, typename result_of::as_child<A const>::type> 1875 , 2 1876 > const operator []expr1877 operator [](A const &a) const 1878 { 1879 proto::expr< 1880 proto::tag::subscript 1881 , list2<expr const &, typename result_of::as_child<A const>::type> 1882 , 2 1883 > that = {*this, proto::as_child(a)}; 1884 return that; 1885 } 1886 1887 1888 template<typename Sig> 1889 struct result 1890 { 1891 typedef typename result_of::funop<Sig, expr, default_domain>::type const type; 1892 }; 1893 1894 1895 1896 proto::expr<proto::tag::function, list1<expr const &>, 1> const operator ()expr1897 operator ()() const 1898 { 1899 proto::expr<proto::tag::function, list1<expr const &>, 1> that = {*this}; 1900 return that; 1901 } 1902 1903 1904 template<typename A0> 1905 typename result_of::funop1< 1906 expr const 1907 , default_domain , const A0 1908 >::type const operator ()expr1909 operator ()(A0 const &a0) const 1910 { 1911 return result_of::funop1< 1912 expr const 1913 , default_domain , const A0 1914 >::call(*this , a0); 1915 } 1916 1917 1918 template<typename A0 , typename A1> 1919 typename result_of::funop2< 1920 expr const 1921 , default_domain , const A0 , const A1 1922 >::type const operator ()expr1923 operator ()(A0 const &a0 , A1 const &a1) const 1924 { 1925 return result_of::funop2< 1926 expr const 1927 , default_domain , const A0 , const A1 1928 >::call(*this , a0 , a1); 1929 } 1930 1931 1932 template<typename A0 , typename A1 , typename A2> 1933 typename result_of::funop3< 1934 expr const 1935 , default_domain , const A0 , const A1 , const A2 1936 >::type const operator ()expr1937 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2) const 1938 { 1939 return result_of::funop3< 1940 expr const 1941 , default_domain , const A0 , const A1 , const A2 1942 >::call(*this , a0 , a1 , a2); 1943 } 1944 1945 1946 template<typename A0 , typename A1 , typename A2 , typename A3> 1947 typename result_of::funop4< 1948 expr const 1949 , default_domain , const A0 , const A1 , const A2 , const A3 1950 >::type const operator ()expr1951 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) const 1952 { 1953 return result_of::funop4< 1954 expr const 1955 , default_domain , const A0 , const A1 , const A2 , const A3 1956 >::call(*this , a0 , a1 , a2 , a3); 1957 } 1958 1959 1960 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4> 1961 typename result_of::funop5< 1962 expr const 1963 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 1964 >::type const operator ()expr1965 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) const 1966 { 1967 return result_of::funop5< 1968 expr const 1969 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 1970 >::call(*this , a0 , a1 , a2 , a3 , a4); 1971 } 1972 1973 1974 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5> 1975 typename result_of::funop6< 1976 expr const 1977 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 1978 >::type const operator ()expr1979 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) const 1980 { 1981 return result_of::funop6< 1982 expr const 1983 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 1984 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5); 1985 } 1986 1987 1988 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6> 1989 typename result_of::funop7< 1990 expr const 1991 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 1992 >::type const operator ()expr1993 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) const 1994 { 1995 return result_of::funop7< 1996 expr const 1997 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 1998 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6); 1999 } 2000 2001 2002 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7> 2003 typename result_of::funop8< 2004 expr const 2005 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 2006 >::type const operator ()expr2007 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) const 2008 { 2009 return result_of::funop8< 2010 expr const 2011 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 2012 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7); 2013 } 2014 2015 2016 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8> 2017 typename result_of::funop9< 2018 expr const 2019 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8 2020 >::type const operator ()expr2021 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) const 2022 { 2023 return result_of::funop9< 2024 expr const 2025 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8 2026 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8); 2027 } 2028 }; 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5> 2057 struct expr<Tag, list6<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5>, 6 > 2058 { 2059 typedef Tag proto_tag; 2060 static const long proto_arity_c = 6; 2061 typedef mpl::long_<6 > proto_arity; 2062 typedef expr proto_base_expr; 2063 typedef list6<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5> proto_args; 2064 typedef basic_expr<Tag, proto_args, 6 > proto_grammar; 2065 typedef default_domain proto_domain; 2066 typedef default_generator proto_generator; 2067 typedef proto::tag::proto_expr fusion_tag; 2068 typedef expr proto_derived_expr; 2069 typedef void proto_is_expr_; 2070 typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; typedef Arg2 proto_child2; proto_child2 child2; typedef Arg3 proto_child3; proto_child3 child3; typedef Arg4 proto_child4; proto_child4 child4; typedef Arg5 proto_child5; proto_child5 child5; 2071 typedef void proto_child6; typedef void proto_child7; typedef void proto_child8; typedef void proto_child9; 2072 2073 proto_baseexpr2074 expr const &proto_base() const 2075 { 2076 return *this; 2077 } 2078 2079 proto_baseexpr2080 expr &proto_base() 2081 { 2082 return *this; 2083 } 2084 2085 2086 2087 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5> makeexpr2088 static expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) 2089 { 2090 expr that = {a0 , a1 , a2 , a3 , a4 , a5}; 2091 return that; 2092 } 2093 2094 2095 typedef detail::not_a_valid_type address_of_hack_type_; 2096 2097 2098 2099 2100 proto::expr< 2101 proto::tag::assign 2102 , list2<expr &, expr const &> 2103 , 2 2104 > const operator =expr2105 operator =(expr const &a) 2106 { 2107 proto::expr< 2108 proto::tag::assign 2109 , list2<expr &, expr const &> 2110 , 2 2111 > that = {*this, a}; 2112 return that; 2113 } 2114 2115 2116 2117 2118 template<typename A> 2119 proto::expr< 2120 proto::tag::assign 2121 , list2<expr const &, typename result_of::as_child<A>::type> 2122 , 2 2123 > const operator =expr2124 operator =(A &a) const 2125 { 2126 proto::expr< 2127 proto::tag::assign 2128 , list2<expr const &, typename result_of::as_child<A>::type> 2129 , 2 2130 > that = {*this, proto::as_child(a)}; 2131 return that; 2132 } 2133 2134 2135 template<typename A> 2136 proto::expr< 2137 proto::tag::assign 2138 , list2<expr const &, typename result_of::as_child<A const>::type> 2139 , 2 2140 > const operator =expr2141 operator =(A const &a) const 2142 { 2143 proto::expr< 2144 proto::tag::assign 2145 , list2<expr const &, typename result_of::as_child<A const>::type> 2146 , 2 2147 > that = {*this, proto::as_child(a)}; 2148 return that; 2149 } 2150 2151 2152 2153 2154 template<typename A> 2155 proto::expr< 2156 proto::tag::subscript 2157 , list2<expr const &, typename result_of::as_child<A>::type> 2158 , 2 2159 > const operator []expr2160 operator [](A &a) const 2161 { 2162 proto::expr< 2163 proto::tag::subscript 2164 , list2<expr const &, typename result_of::as_child<A>::type> 2165 , 2 2166 > that = {*this, proto::as_child(a)}; 2167 return that; 2168 } 2169 2170 2171 template<typename A> 2172 proto::expr< 2173 proto::tag::subscript 2174 , list2<expr const &, typename result_of::as_child<A const>::type> 2175 , 2 2176 > const operator []expr2177 operator [](A const &a) const 2178 { 2179 proto::expr< 2180 proto::tag::subscript 2181 , list2<expr const &, typename result_of::as_child<A const>::type> 2182 , 2 2183 > that = {*this, proto::as_child(a)}; 2184 return that; 2185 } 2186 2187 2188 template<typename Sig> 2189 struct result 2190 { 2191 typedef typename result_of::funop<Sig, expr, default_domain>::type const type; 2192 }; 2193 2194 2195 2196 proto::expr<proto::tag::function, list1<expr const &>, 1> const operator ()expr2197 operator ()() const 2198 { 2199 proto::expr<proto::tag::function, list1<expr const &>, 1> that = {*this}; 2200 return that; 2201 } 2202 2203 2204 template<typename A0> 2205 typename result_of::funop1< 2206 expr const 2207 , default_domain , const A0 2208 >::type const operator ()expr2209 operator ()(A0 const &a0) const 2210 { 2211 return result_of::funop1< 2212 expr const 2213 , default_domain , const A0 2214 >::call(*this , a0); 2215 } 2216 2217 2218 template<typename A0 , typename A1> 2219 typename result_of::funop2< 2220 expr const 2221 , default_domain , const A0 , const A1 2222 >::type const operator ()expr2223 operator ()(A0 const &a0 , A1 const &a1) const 2224 { 2225 return result_of::funop2< 2226 expr const 2227 , default_domain , const A0 , const A1 2228 >::call(*this , a0 , a1); 2229 } 2230 2231 2232 template<typename A0 , typename A1 , typename A2> 2233 typename result_of::funop3< 2234 expr const 2235 , default_domain , const A0 , const A1 , const A2 2236 >::type const operator ()expr2237 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2) const 2238 { 2239 return result_of::funop3< 2240 expr const 2241 , default_domain , const A0 , const A1 , const A2 2242 >::call(*this , a0 , a1 , a2); 2243 } 2244 2245 2246 template<typename A0 , typename A1 , typename A2 , typename A3> 2247 typename result_of::funop4< 2248 expr const 2249 , default_domain , const A0 , const A1 , const A2 , const A3 2250 >::type const operator ()expr2251 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) const 2252 { 2253 return result_of::funop4< 2254 expr const 2255 , default_domain , const A0 , const A1 , const A2 , const A3 2256 >::call(*this , a0 , a1 , a2 , a3); 2257 } 2258 2259 2260 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4> 2261 typename result_of::funop5< 2262 expr const 2263 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 2264 >::type const operator ()expr2265 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) const 2266 { 2267 return result_of::funop5< 2268 expr const 2269 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 2270 >::call(*this , a0 , a1 , a2 , a3 , a4); 2271 } 2272 2273 2274 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5> 2275 typename result_of::funop6< 2276 expr const 2277 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 2278 >::type const operator ()expr2279 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) const 2280 { 2281 return result_of::funop6< 2282 expr const 2283 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 2284 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5); 2285 } 2286 2287 2288 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6> 2289 typename result_of::funop7< 2290 expr const 2291 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 2292 >::type const operator ()expr2293 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) const 2294 { 2295 return result_of::funop7< 2296 expr const 2297 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 2298 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6); 2299 } 2300 2301 2302 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7> 2303 typename result_of::funop8< 2304 expr const 2305 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 2306 >::type const operator ()expr2307 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) const 2308 { 2309 return result_of::funop8< 2310 expr const 2311 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 2312 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7); 2313 } 2314 2315 2316 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8> 2317 typename result_of::funop9< 2318 expr const 2319 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8 2320 >::type const operator ()expr2321 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) const 2322 { 2323 return result_of::funop9< 2324 expr const 2325 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8 2326 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8); 2327 } 2328 }; 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6> 2357 struct expr<Tag, list7<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6>, 7 > 2358 { 2359 typedef Tag proto_tag; 2360 static const long proto_arity_c = 7; 2361 typedef mpl::long_<7 > proto_arity; 2362 typedef expr proto_base_expr; 2363 typedef list7<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6> proto_args; 2364 typedef basic_expr<Tag, proto_args, 7 > proto_grammar; 2365 typedef default_domain proto_domain; 2366 typedef default_generator proto_generator; 2367 typedef proto::tag::proto_expr fusion_tag; 2368 typedef expr proto_derived_expr; 2369 typedef void proto_is_expr_; 2370 typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; typedef Arg2 proto_child2; proto_child2 child2; typedef Arg3 proto_child3; proto_child3 child3; typedef Arg4 proto_child4; proto_child4 child4; typedef Arg5 proto_child5; proto_child5 child5; typedef Arg6 proto_child6; proto_child6 child6; 2371 typedef void proto_child7; typedef void proto_child8; typedef void proto_child9; 2372 2373 proto_baseexpr2374 expr const &proto_base() const 2375 { 2376 return *this; 2377 } 2378 2379 proto_baseexpr2380 expr &proto_base() 2381 { 2382 return *this; 2383 } 2384 2385 2386 2387 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6> makeexpr2388 static expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) 2389 { 2390 expr that = {a0 , a1 , a2 , a3 , a4 , a5 , a6}; 2391 return that; 2392 } 2393 2394 2395 typedef detail::not_a_valid_type address_of_hack_type_; 2396 2397 2398 2399 2400 proto::expr< 2401 proto::tag::assign 2402 , list2<expr &, expr const &> 2403 , 2 2404 > const operator =expr2405 operator =(expr const &a) 2406 { 2407 proto::expr< 2408 proto::tag::assign 2409 , list2<expr &, expr const &> 2410 , 2 2411 > that = {*this, a}; 2412 return that; 2413 } 2414 2415 2416 2417 2418 template<typename A> 2419 proto::expr< 2420 proto::tag::assign 2421 , list2<expr const &, typename result_of::as_child<A>::type> 2422 , 2 2423 > const operator =expr2424 operator =(A &a) const 2425 { 2426 proto::expr< 2427 proto::tag::assign 2428 , list2<expr const &, typename result_of::as_child<A>::type> 2429 , 2 2430 > that = {*this, proto::as_child(a)}; 2431 return that; 2432 } 2433 2434 2435 template<typename A> 2436 proto::expr< 2437 proto::tag::assign 2438 , list2<expr const &, typename result_of::as_child<A const>::type> 2439 , 2 2440 > const operator =expr2441 operator =(A const &a) const 2442 { 2443 proto::expr< 2444 proto::tag::assign 2445 , list2<expr const &, typename result_of::as_child<A const>::type> 2446 , 2 2447 > that = {*this, proto::as_child(a)}; 2448 return that; 2449 } 2450 2451 2452 2453 2454 template<typename A> 2455 proto::expr< 2456 proto::tag::subscript 2457 , list2<expr const &, typename result_of::as_child<A>::type> 2458 , 2 2459 > const operator []expr2460 operator [](A &a) const 2461 { 2462 proto::expr< 2463 proto::tag::subscript 2464 , list2<expr const &, typename result_of::as_child<A>::type> 2465 , 2 2466 > that = {*this, proto::as_child(a)}; 2467 return that; 2468 } 2469 2470 2471 template<typename A> 2472 proto::expr< 2473 proto::tag::subscript 2474 , list2<expr const &, typename result_of::as_child<A const>::type> 2475 , 2 2476 > const operator []expr2477 operator [](A const &a) const 2478 { 2479 proto::expr< 2480 proto::tag::subscript 2481 , list2<expr const &, typename result_of::as_child<A const>::type> 2482 , 2 2483 > that = {*this, proto::as_child(a)}; 2484 return that; 2485 } 2486 2487 2488 template<typename Sig> 2489 struct result 2490 { 2491 typedef typename result_of::funop<Sig, expr, default_domain>::type const type; 2492 }; 2493 2494 2495 2496 proto::expr<proto::tag::function, list1<expr const &>, 1> const operator ()expr2497 operator ()() const 2498 { 2499 proto::expr<proto::tag::function, list1<expr const &>, 1> that = {*this}; 2500 return that; 2501 } 2502 2503 2504 template<typename A0> 2505 typename result_of::funop1< 2506 expr const 2507 , default_domain , const A0 2508 >::type const operator ()expr2509 operator ()(A0 const &a0) const 2510 { 2511 return result_of::funop1< 2512 expr const 2513 , default_domain , const A0 2514 >::call(*this , a0); 2515 } 2516 2517 2518 template<typename A0 , typename A1> 2519 typename result_of::funop2< 2520 expr const 2521 , default_domain , const A0 , const A1 2522 >::type const operator ()expr2523 operator ()(A0 const &a0 , A1 const &a1) const 2524 { 2525 return result_of::funop2< 2526 expr const 2527 , default_domain , const A0 , const A1 2528 >::call(*this , a0 , a1); 2529 } 2530 2531 2532 template<typename A0 , typename A1 , typename A2> 2533 typename result_of::funop3< 2534 expr const 2535 , default_domain , const A0 , const A1 , const A2 2536 >::type const operator ()expr2537 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2) const 2538 { 2539 return result_of::funop3< 2540 expr const 2541 , default_domain , const A0 , const A1 , const A2 2542 >::call(*this , a0 , a1 , a2); 2543 } 2544 2545 2546 template<typename A0 , typename A1 , typename A2 , typename A3> 2547 typename result_of::funop4< 2548 expr const 2549 , default_domain , const A0 , const A1 , const A2 , const A3 2550 >::type const operator ()expr2551 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) const 2552 { 2553 return result_of::funop4< 2554 expr const 2555 , default_domain , const A0 , const A1 , const A2 , const A3 2556 >::call(*this , a0 , a1 , a2 , a3); 2557 } 2558 2559 2560 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4> 2561 typename result_of::funop5< 2562 expr const 2563 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 2564 >::type const operator ()expr2565 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) const 2566 { 2567 return result_of::funop5< 2568 expr const 2569 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 2570 >::call(*this , a0 , a1 , a2 , a3 , a4); 2571 } 2572 2573 2574 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5> 2575 typename result_of::funop6< 2576 expr const 2577 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 2578 >::type const operator ()expr2579 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) const 2580 { 2581 return result_of::funop6< 2582 expr const 2583 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 2584 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5); 2585 } 2586 2587 2588 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6> 2589 typename result_of::funop7< 2590 expr const 2591 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 2592 >::type const operator ()expr2593 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) const 2594 { 2595 return result_of::funop7< 2596 expr const 2597 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 2598 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6); 2599 } 2600 2601 2602 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7> 2603 typename result_of::funop8< 2604 expr const 2605 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 2606 >::type const operator ()expr2607 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) const 2608 { 2609 return result_of::funop8< 2610 expr const 2611 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 2612 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7); 2613 } 2614 2615 2616 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8> 2617 typename result_of::funop9< 2618 expr const 2619 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8 2620 >::type const operator ()expr2621 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) const 2622 { 2623 return result_of::funop9< 2624 expr const 2625 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8 2626 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8); 2627 } 2628 }; 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7> 2657 struct expr<Tag, list8<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7>, 8 > 2658 { 2659 typedef Tag proto_tag; 2660 static const long proto_arity_c = 8; 2661 typedef mpl::long_<8 > proto_arity; 2662 typedef expr proto_base_expr; 2663 typedef list8<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7> proto_args; 2664 typedef basic_expr<Tag, proto_args, 8 > proto_grammar; 2665 typedef default_domain proto_domain; 2666 typedef default_generator proto_generator; 2667 typedef proto::tag::proto_expr fusion_tag; 2668 typedef expr proto_derived_expr; 2669 typedef void proto_is_expr_; 2670 typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; typedef Arg2 proto_child2; proto_child2 child2; typedef Arg3 proto_child3; proto_child3 child3; typedef Arg4 proto_child4; proto_child4 child4; typedef Arg5 proto_child5; proto_child5 child5; typedef Arg6 proto_child6; proto_child6 child6; typedef Arg7 proto_child7; proto_child7 child7; 2671 typedef void proto_child8; typedef void proto_child9; 2672 2673 proto_baseexpr2674 expr const &proto_base() const 2675 { 2676 return *this; 2677 } 2678 2679 proto_baseexpr2680 expr &proto_base() 2681 { 2682 return *this; 2683 } 2684 2685 2686 2687 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7> makeexpr2688 static expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) 2689 { 2690 expr that = {a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7}; 2691 return that; 2692 } 2693 2694 2695 typedef detail::not_a_valid_type address_of_hack_type_; 2696 2697 2698 2699 2700 proto::expr< 2701 proto::tag::assign 2702 , list2<expr &, expr const &> 2703 , 2 2704 > const operator =expr2705 operator =(expr const &a) 2706 { 2707 proto::expr< 2708 proto::tag::assign 2709 , list2<expr &, expr const &> 2710 , 2 2711 > that = {*this, a}; 2712 return that; 2713 } 2714 2715 2716 2717 2718 template<typename A> 2719 proto::expr< 2720 proto::tag::assign 2721 , list2<expr const &, typename result_of::as_child<A>::type> 2722 , 2 2723 > const operator =expr2724 operator =(A &a) const 2725 { 2726 proto::expr< 2727 proto::tag::assign 2728 , list2<expr const &, typename result_of::as_child<A>::type> 2729 , 2 2730 > that = {*this, proto::as_child(a)}; 2731 return that; 2732 } 2733 2734 2735 template<typename A> 2736 proto::expr< 2737 proto::tag::assign 2738 , list2<expr const &, typename result_of::as_child<A const>::type> 2739 , 2 2740 > const operator =expr2741 operator =(A const &a) const 2742 { 2743 proto::expr< 2744 proto::tag::assign 2745 , list2<expr const &, typename result_of::as_child<A const>::type> 2746 , 2 2747 > that = {*this, proto::as_child(a)}; 2748 return that; 2749 } 2750 2751 2752 2753 2754 template<typename A> 2755 proto::expr< 2756 proto::tag::subscript 2757 , list2<expr const &, typename result_of::as_child<A>::type> 2758 , 2 2759 > const operator []expr2760 operator [](A &a) const 2761 { 2762 proto::expr< 2763 proto::tag::subscript 2764 , list2<expr const &, typename result_of::as_child<A>::type> 2765 , 2 2766 > that = {*this, proto::as_child(a)}; 2767 return that; 2768 } 2769 2770 2771 template<typename A> 2772 proto::expr< 2773 proto::tag::subscript 2774 , list2<expr const &, typename result_of::as_child<A const>::type> 2775 , 2 2776 > const operator []expr2777 operator [](A const &a) const 2778 { 2779 proto::expr< 2780 proto::tag::subscript 2781 , list2<expr const &, typename result_of::as_child<A const>::type> 2782 , 2 2783 > that = {*this, proto::as_child(a)}; 2784 return that; 2785 } 2786 2787 2788 template<typename Sig> 2789 struct result 2790 { 2791 typedef typename result_of::funop<Sig, expr, default_domain>::type const type; 2792 }; 2793 2794 2795 2796 proto::expr<proto::tag::function, list1<expr const &>, 1> const operator ()expr2797 operator ()() const 2798 { 2799 proto::expr<proto::tag::function, list1<expr const &>, 1> that = {*this}; 2800 return that; 2801 } 2802 2803 2804 template<typename A0> 2805 typename result_of::funop1< 2806 expr const 2807 , default_domain , const A0 2808 >::type const operator ()expr2809 operator ()(A0 const &a0) const 2810 { 2811 return result_of::funop1< 2812 expr const 2813 , default_domain , const A0 2814 >::call(*this , a0); 2815 } 2816 2817 2818 template<typename A0 , typename A1> 2819 typename result_of::funop2< 2820 expr const 2821 , default_domain , const A0 , const A1 2822 >::type const operator ()expr2823 operator ()(A0 const &a0 , A1 const &a1) const 2824 { 2825 return result_of::funop2< 2826 expr const 2827 , default_domain , const A0 , const A1 2828 >::call(*this , a0 , a1); 2829 } 2830 2831 2832 template<typename A0 , typename A1 , typename A2> 2833 typename result_of::funop3< 2834 expr const 2835 , default_domain , const A0 , const A1 , const A2 2836 >::type const operator ()expr2837 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2) const 2838 { 2839 return result_of::funop3< 2840 expr const 2841 , default_domain , const A0 , const A1 , const A2 2842 >::call(*this , a0 , a1 , a2); 2843 } 2844 2845 2846 template<typename A0 , typename A1 , typename A2 , typename A3> 2847 typename result_of::funop4< 2848 expr const 2849 , default_domain , const A0 , const A1 , const A2 , const A3 2850 >::type const operator ()expr2851 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) const 2852 { 2853 return result_of::funop4< 2854 expr const 2855 , default_domain , const A0 , const A1 , const A2 , const A3 2856 >::call(*this , a0 , a1 , a2 , a3); 2857 } 2858 2859 2860 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4> 2861 typename result_of::funop5< 2862 expr const 2863 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 2864 >::type const operator ()expr2865 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) const 2866 { 2867 return result_of::funop5< 2868 expr const 2869 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 2870 >::call(*this , a0 , a1 , a2 , a3 , a4); 2871 } 2872 2873 2874 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5> 2875 typename result_of::funop6< 2876 expr const 2877 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 2878 >::type const operator ()expr2879 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) const 2880 { 2881 return result_of::funop6< 2882 expr const 2883 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 2884 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5); 2885 } 2886 2887 2888 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6> 2889 typename result_of::funop7< 2890 expr const 2891 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 2892 >::type const operator ()expr2893 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) const 2894 { 2895 return result_of::funop7< 2896 expr const 2897 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 2898 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6); 2899 } 2900 2901 2902 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7> 2903 typename result_of::funop8< 2904 expr const 2905 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 2906 >::type const operator ()expr2907 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) const 2908 { 2909 return result_of::funop8< 2910 expr const 2911 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 2912 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7); 2913 } 2914 2915 2916 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8> 2917 typename result_of::funop9< 2918 expr const 2919 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8 2920 >::type const operator ()expr2921 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) const 2922 { 2923 return result_of::funop9< 2924 expr const 2925 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8 2926 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8); 2927 } 2928 }; 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8> 2957 struct expr<Tag, list9<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8>, 9 > 2958 { 2959 typedef Tag proto_tag; 2960 static const long proto_arity_c = 9; 2961 typedef mpl::long_<9 > proto_arity; 2962 typedef expr proto_base_expr; 2963 typedef list9<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8> proto_args; 2964 typedef basic_expr<Tag, proto_args, 9 > proto_grammar; 2965 typedef default_domain proto_domain; 2966 typedef default_generator proto_generator; 2967 typedef proto::tag::proto_expr fusion_tag; 2968 typedef expr proto_derived_expr; 2969 typedef void proto_is_expr_; 2970 typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; typedef Arg2 proto_child2; proto_child2 child2; typedef Arg3 proto_child3; proto_child3 child3; typedef Arg4 proto_child4; proto_child4 child4; typedef Arg5 proto_child5; proto_child5 child5; typedef Arg6 proto_child6; proto_child6 child6; typedef Arg7 proto_child7; proto_child7 child7; typedef Arg8 proto_child8; proto_child8 child8; 2971 typedef void proto_child9; 2972 2973 proto_baseexpr2974 expr const &proto_base() const 2975 { 2976 return *this; 2977 } 2978 2979 proto_baseexpr2980 expr &proto_base() 2981 { 2982 return *this; 2983 } 2984 2985 2986 2987 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8> makeexpr2988 static expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) 2989 { 2990 expr that = {a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8}; 2991 return that; 2992 } 2993 2994 2995 typedef detail::not_a_valid_type address_of_hack_type_; 2996 2997 2998 2999 3000 proto::expr< 3001 proto::tag::assign 3002 , list2<expr &, expr const &> 3003 , 2 3004 > const operator =expr3005 operator =(expr const &a) 3006 { 3007 proto::expr< 3008 proto::tag::assign 3009 , list2<expr &, expr const &> 3010 , 2 3011 > that = {*this, a}; 3012 return that; 3013 } 3014 3015 3016 3017 3018 template<typename A> 3019 proto::expr< 3020 proto::tag::assign 3021 , list2<expr const &, typename result_of::as_child<A>::type> 3022 , 2 3023 > const operator =expr3024 operator =(A &a) const 3025 { 3026 proto::expr< 3027 proto::tag::assign 3028 , list2<expr const &, typename result_of::as_child<A>::type> 3029 , 2 3030 > that = {*this, proto::as_child(a)}; 3031 return that; 3032 } 3033 3034 3035 template<typename A> 3036 proto::expr< 3037 proto::tag::assign 3038 , list2<expr const &, typename result_of::as_child<A const>::type> 3039 , 2 3040 > const operator =expr3041 operator =(A const &a) const 3042 { 3043 proto::expr< 3044 proto::tag::assign 3045 , list2<expr const &, typename result_of::as_child<A const>::type> 3046 , 2 3047 > that = {*this, proto::as_child(a)}; 3048 return that; 3049 } 3050 3051 3052 3053 3054 template<typename A> 3055 proto::expr< 3056 proto::tag::subscript 3057 , list2<expr const &, typename result_of::as_child<A>::type> 3058 , 2 3059 > const operator []expr3060 operator [](A &a) const 3061 { 3062 proto::expr< 3063 proto::tag::subscript 3064 , list2<expr const &, typename result_of::as_child<A>::type> 3065 , 2 3066 > that = {*this, proto::as_child(a)}; 3067 return that; 3068 } 3069 3070 3071 template<typename A> 3072 proto::expr< 3073 proto::tag::subscript 3074 , list2<expr const &, typename result_of::as_child<A const>::type> 3075 , 2 3076 > const operator []expr3077 operator [](A const &a) const 3078 { 3079 proto::expr< 3080 proto::tag::subscript 3081 , list2<expr const &, typename result_of::as_child<A const>::type> 3082 , 2 3083 > that = {*this, proto::as_child(a)}; 3084 return that; 3085 } 3086 3087 3088 template<typename Sig> 3089 struct result 3090 { 3091 typedef typename result_of::funop<Sig, expr, default_domain>::type const type; 3092 }; 3093 3094 3095 3096 proto::expr<proto::tag::function, list1<expr const &>, 1> const operator ()expr3097 operator ()() const 3098 { 3099 proto::expr<proto::tag::function, list1<expr const &>, 1> that = {*this}; 3100 return that; 3101 } 3102 3103 3104 template<typename A0> 3105 typename result_of::funop1< 3106 expr const 3107 , default_domain , const A0 3108 >::type const operator ()expr3109 operator ()(A0 const &a0) const 3110 { 3111 return result_of::funop1< 3112 expr const 3113 , default_domain , const A0 3114 >::call(*this , a0); 3115 } 3116 3117 3118 template<typename A0 , typename A1> 3119 typename result_of::funop2< 3120 expr const 3121 , default_domain , const A0 , const A1 3122 >::type const operator ()expr3123 operator ()(A0 const &a0 , A1 const &a1) const 3124 { 3125 return result_of::funop2< 3126 expr const 3127 , default_domain , const A0 , const A1 3128 >::call(*this , a0 , a1); 3129 } 3130 3131 3132 template<typename A0 , typename A1 , typename A2> 3133 typename result_of::funop3< 3134 expr const 3135 , default_domain , const A0 , const A1 , const A2 3136 >::type const operator ()expr3137 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2) const 3138 { 3139 return result_of::funop3< 3140 expr const 3141 , default_domain , const A0 , const A1 , const A2 3142 >::call(*this , a0 , a1 , a2); 3143 } 3144 3145 3146 template<typename A0 , typename A1 , typename A2 , typename A3> 3147 typename result_of::funop4< 3148 expr const 3149 , default_domain , const A0 , const A1 , const A2 , const A3 3150 >::type const operator ()expr3151 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) const 3152 { 3153 return result_of::funop4< 3154 expr const 3155 , default_domain , const A0 , const A1 , const A2 , const A3 3156 >::call(*this , a0 , a1 , a2 , a3); 3157 } 3158 3159 3160 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4> 3161 typename result_of::funop5< 3162 expr const 3163 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 3164 >::type const operator ()expr3165 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) const 3166 { 3167 return result_of::funop5< 3168 expr const 3169 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 3170 >::call(*this , a0 , a1 , a2 , a3 , a4); 3171 } 3172 3173 3174 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5> 3175 typename result_of::funop6< 3176 expr const 3177 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 3178 >::type const operator ()expr3179 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) const 3180 { 3181 return result_of::funop6< 3182 expr const 3183 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 3184 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5); 3185 } 3186 3187 3188 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6> 3189 typename result_of::funop7< 3190 expr const 3191 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 3192 >::type const operator ()expr3193 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) const 3194 { 3195 return result_of::funop7< 3196 expr const 3197 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 3198 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6); 3199 } 3200 3201 3202 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7> 3203 typename result_of::funop8< 3204 expr const 3205 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 3206 >::type const operator ()expr3207 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) const 3208 { 3209 return result_of::funop8< 3210 expr const 3211 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 3212 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7); 3213 } 3214 3215 3216 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8> 3217 typename result_of::funop9< 3218 expr const 3219 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8 3220 >::type const operator ()expr3221 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) const 3222 { 3223 return result_of::funop9< 3224 expr const 3225 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8 3226 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8); 3227 } 3228 }; 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8 , typename Arg9> 3257 struct expr<Tag, list10<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8 , Arg9>, 10 > 3258 { 3259 typedef Tag proto_tag; 3260 static const long proto_arity_c = 10; 3261 typedef mpl::long_<10 > proto_arity; 3262 typedef expr proto_base_expr; 3263 typedef list10<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8 , Arg9> proto_args; 3264 typedef basic_expr<Tag, proto_args, 10 > proto_grammar; 3265 typedef default_domain proto_domain; 3266 typedef default_generator proto_generator; 3267 typedef proto::tag::proto_expr fusion_tag; 3268 typedef expr proto_derived_expr; 3269 typedef void proto_is_expr_; 3270 typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; typedef Arg2 proto_child2; proto_child2 child2; typedef Arg3 proto_child3; proto_child3 child3; typedef Arg4 proto_child4; proto_child4 child4; typedef Arg5 proto_child5; proto_child5 child5; typedef Arg6 proto_child6; proto_child6 child6; typedef Arg7 proto_child7; proto_child7 child7; typedef Arg8 proto_child8; proto_child8 child8; typedef Arg9 proto_child9; proto_child9 child9; 3271 3272 3273 proto_baseexpr3274 expr const &proto_base() const 3275 { 3276 return *this; 3277 } 3278 3279 proto_baseexpr3280 expr &proto_base() 3281 { 3282 return *this; 3283 } 3284 3285 3286 3287 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9> makeexpr3288 static expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8 , A9 const &a9) 3289 { 3290 expr that = {a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9}; 3291 return that; 3292 } 3293 3294 3295 typedef detail::not_a_valid_type address_of_hack_type_; 3296 3297 3298 3299 3300 proto::expr< 3301 proto::tag::assign 3302 , list2<expr &, expr const &> 3303 , 2 3304 > const operator =expr3305 operator =(expr const &a) 3306 { 3307 proto::expr< 3308 proto::tag::assign 3309 , list2<expr &, expr const &> 3310 , 2 3311 > that = {*this, a}; 3312 return that; 3313 } 3314 3315 3316 3317 3318 template<typename A> 3319 proto::expr< 3320 proto::tag::assign 3321 , list2<expr const &, typename result_of::as_child<A>::type> 3322 , 2 3323 > const operator =expr3324 operator =(A &a) const 3325 { 3326 proto::expr< 3327 proto::tag::assign 3328 , list2<expr const &, typename result_of::as_child<A>::type> 3329 , 2 3330 > that = {*this, proto::as_child(a)}; 3331 return that; 3332 } 3333 3334 3335 template<typename A> 3336 proto::expr< 3337 proto::tag::assign 3338 , list2<expr const &, typename result_of::as_child<A const>::type> 3339 , 2 3340 > const operator =expr3341 operator =(A const &a) const 3342 { 3343 proto::expr< 3344 proto::tag::assign 3345 , list2<expr const &, typename result_of::as_child<A const>::type> 3346 , 2 3347 > that = {*this, proto::as_child(a)}; 3348 return that; 3349 } 3350 3351 3352 3353 3354 template<typename A> 3355 proto::expr< 3356 proto::tag::subscript 3357 , list2<expr const &, typename result_of::as_child<A>::type> 3358 , 2 3359 > const operator []expr3360 operator [](A &a) const 3361 { 3362 proto::expr< 3363 proto::tag::subscript 3364 , list2<expr const &, typename result_of::as_child<A>::type> 3365 , 2 3366 > that = {*this, proto::as_child(a)}; 3367 return that; 3368 } 3369 3370 3371 template<typename A> 3372 proto::expr< 3373 proto::tag::subscript 3374 , list2<expr const &, typename result_of::as_child<A const>::type> 3375 , 2 3376 > const operator []expr3377 operator [](A const &a) const 3378 { 3379 proto::expr< 3380 proto::tag::subscript 3381 , list2<expr const &, typename result_of::as_child<A const>::type> 3382 , 2 3383 > that = {*this, proto::as_child(a)}; 3384 return that; 3385 } 3386 3387 3388 template<typename Sig> 3389 struct result 3390 { 3391 typedef typename result_of::funop<Sig, expr, default_domain>::type const type; 3392 }; 3393 3394 3395 3396 proto::expr<proto::tag::function, list1<expr const &>, 1> const operator ()expr3397 operator ()() const 3398 { 3399 proto::expr<proto::tag::function, list1<expr const &>, 1> that = {*this}; 3400 return that; 3401 } 3402 3403 3404 template<typename A0> 3405 typename result_of::funop1< 3406 expr const 3407 , default_domain , const A0 3408 >::type const operator ()expr3409 operator ()(A0 const &a0) const 3410 { 3411 return result_of::funop1< 3412 expr const 3413 , default_domain , const A0 3414 >::call(*this , a0); 3415 } 3416 3417 3418 template<typename A0 , typename A1> 3419 typename result_of::funop2< 3420 expr const 3421 , default_domain , const A0 , const A1 3422 >::type const operator ()expr3423 operator ()(A0 const &a0 , A1 const &a1) const 3424 { 3425 return result_of::funop2< 3426 expr const 3427 , default_domain , const A0 , const A1 3428 >::call(*this , a0 , a1); 3429 } 3430 3431 3432 template<typename A0 , typename A1 , typename A2> 3433 typename result_of::funop3< 3434 expr const 3435 , default_domain , const A0 , const A1 , const A2 3436 >::type const operator ()expr3437 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2) const 3438 { 3439 return result_of::funop3< 3440 expr const 3441 , default_domain , const A0 , const A1 , const A2 3442 >::call(*this , a0 , a1 , a2); 3443 } 3444 3445 3446 template<typename A0 , typename A1 , typename A2 , typename A3> 3447 typename result_of::funop4< 3448 expr const 3449 , default_domain , const A0 , const A1 , const A2 , const A3 3450 >::type const operator ()expr3451 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) const 3452 { 3453 return result_of::funop4< 3454 expr const 3455 , default_domain , const A0 , const A1 , const A2 , const A3 3456 >::call(*this , a0 , a1 , a2 , a3); 3457 } 3458 3459 3460 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4> 3461 typename result_of::funop5< 3462 expr const 3463 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 3464 >::type const operator ()expr3465 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) const 3466 { 3467 return result_of::funop5< 3468 expr const 3469 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 3470 >::call(*this , a0 , a1 , a2 , a3 , a4); 3471 } 3472 3473 3474 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5> 3475 typename result_of::funop6< 3476 expr const 3477 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 3478 >::type const operator ()expr3479 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) const 3480 { 3481 return result_of::funop6< 3482 expr const 3483 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 3484 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5); 3485 } 3486 3487 3488 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6> 3489 typename result_of::funop7< 3490 expr const 3491 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 3492 >::type const operator ()expr3493 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6) const 3494 { 3495 return result_of::funop7< 3496 expr const 3497 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 3498 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6); 3499 } 3500 3501 3502 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7> 3503 typename result_of::funop8< 3504 expr const 3505 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 3506 >::type const operator ()expr3507 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7) const 3508 { 3509 return result_of::funop8< 3510 expr const 3511 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 3512 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7); 3513 } 3514 3515 3516 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8> 3517 typename result_of::funop9< 3518 expr const 3519 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8 3520 >::type const operator ()expr3521 operator ()(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5 , A6 const &a6 , A7 const &a7 , A8 const &a8) const 3522 { 3523 return result_of::funop9< 3524 expr const 3525 , default_domain , const A0 , const A1 , const A2 , const A3 , const A4 , const A5 , const A6 , const A7 , const A8 3526 >::call(*this , a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8); 3527 } 3528 }; 3529