1 /////////////////////////////////////////////////////////////////////////////// 2 /// \file expr_variadic.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<Tag, proto_domain> 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 54 BOOST_FORCEINLINE proto_baseexpr55 expr const &proto_base() const 56 { 57 return *this; 58 } 59 60 61 BOOST_FORCEINLINE proto_baseexpr62 expr &proto_base() 63 { 64 return *this; 65 } 66 67 68 69 template<typename A0> 70 BOOST_FORCEINLINE makeexpr71 static expr const make(A0 &a0) 72 { 73 return detail::make_terminal(a0, static_cast<expr *>(0), static_cast<proto_args *>(0)); 74 } 75 76 77 template<typename A0> 78 BOOST_FORCEINLINE makeexpr79 static expr const make(A0 const &a0) 80 { 81 return detail::make_terminal(a0, static_cast<expr *>(0), static_cast<proto_args *>(0)); 82 } 83 84 85 typedef detail::not_a_valid_type address_of_hack_type_; 86 87 88 89 90 BOOST_FORCEINLINE 91 proto::expr< 92 proto::tag::assign 93 , list2<expr &, expr const &> 94 , 2 95 > const operator =expr96 operator =(expr const &a) 97 { 98 proto::expr< 99 proto::tag::assign 100 , list2<expr &, expr const &> 101 , 2 102 > that = {*this, a}; 103 return that; 104 } 105 106 107 108 109 template<typename A> 110 BOOST_FORCEINLINE 111 proto::expr< 112 proto::tag::assign 113 , list2<expr const &, typename result_of::as_child<A>::type> 114 , 2 115 > const operator =expr116 operator =(A &a) const 117 { 118 proto::expr< 119 proto::tag::assign 120 , list2<expr const &, typename result_of::as_child<A>::type> 121 , 2 122 > that = {*this, proto::as_child(a)}; 123 return that; 124 } 125 126 127 template<typename A> 128 BOOST_FORCEINLINE 129 proto::expr< 130 proto::tag::assign 131 , list2<expr const &, typename result_of::as_child<A const>::type> 132 , 2 133 > const operator =expr134 operator =(A const &a) const 135 { 136 proto::expr< 137 proto::tag::assign 138 , list2<expr const &, typename result_of::as_child<A const>::type> 139 , 2 140 > that = {*this, proto::as_child(a)}; 141 return that; 142 } 143 144 145 template<typename A> 146 BOOST_FORCEINLINE 147 proto::expr< 148 proto::tag::assign 149 , list2<expr &, typename result_of::as_child<A>::type> 150 , 2 151 > const operator =expr152 operator =(A &a) 153 { 154 proto::expr< 155 proto::tag::assign 156 , list2<expr &, typename result_of::as_child<A>::type> 157 , 2 158 > that = {*this, proto::as_child(a)}; 159 return that; 160 } 161 162 163 template<typename A> 164 BOOST_FORCEINLINE 165 proto::expr< 166 proto::tag::assign 167 , list2<expr &, typename result_of::as_child<A const>::type> 168 , 2 169 > const operator =expr170 operator =(A const &a) 171 { 172 proto::expr< 173 proto::tag::assign 174 , list2<expr &, typename result_of::as_child<A const>::type> 175 , 2 176 > that = {*this, proto::as_child(a)}; 177 return that; 178 } 179 180 181 182 183 template<typename A> 184 BOOST_FORCEINLINE 185 proto::expr< 186 proto::tag::subscript 187 , list2<expr const &, typename result_of::as_child<A>::type> 188 , 2 189 > const operator []expr190 operator [](A &a) const 191 { 192 proto::expr< 193 proto::tag::subscript 194 , list2<expr const &, typename result_of::as_child<A>::type> 195 , 2 196 > that = {*this, proto::as_child(a)}; 197 return that; 198 } 199 200 201 template<typename A> 202 BOOST_FORCEINLINE 203 proto::expr< 204 proto::tag::subscript 205 , list2<expr const &, typename result_of::as_child<A const>::type> 206 , 2 207 > const operator []expr208 operator [](A const &a) const 209 { 210 proto::expr< 211 proto::tag::subscript 212 , list2<expr const &, typename result_of::as_child<A const>::type> 213 , 2 214 > that = {*this, proto::as_child(a)}; 215 return that; 216 } 217 218 219 template<typename A> 220 BOOST_FORCEINLINE 221 proto::expr< 222 proto::tag::subscript 223 , list2<expr &, typename result_of::as_child<A>::type> 224 , 2 225 > const operator []expr226 operator [](A &a) 227 { 228 proto::expr< 229 proto::tag::subscript 230 , list2<expr &, typename result_of::as_child<A>::type> 231 , 2 232 > that = {*this, proto::as_child(a)}; 233 return that; 234 } 235 236 237 template<typename A> 238 BOOST_FORCEINLINE 239 proto::expr< 240 proto::tag::subscript 241 , list2<expr &, typename result_of::as_child<A const>::type> 242 , 2 243 > const operator []expr244 operator [](A const &a) 245 { 246 proto::expr< 247 proto::tag::subscript 248 , list2<expr &, typename result_of::as_child<A const>::type> 249 , 2 250 > that = {*this, proto::as_child(a)}; 251 return that; 252 } 253 254 255 template<typename Sig> 256 struct result 257 { 258 typedef typename result_of::funop<Sig, expr, default_domain>::type const type; 259 }; 260 261 262 template<typename ...A> 263 BOOST_FORCEINLINE 264 typename result_of::funop< 265 expr const(A const &...) 266 , expr 267 , default_domain 268 >::type const operator ()expr269 operator ()(A const &... a) const 270 { 271 return result_of::funop< 272 expr const(A const &...) 273 , expr 274 , default_domain 275 >::call(*this, a...); 276 } 277 278 279 template<typename ...A> 280 BOOST_FORCEINLINE 281 typename result_of::funop< 282 expr(A const &...) 283 , expr 284 , default_domain 285 >::type const operator ()expr286 operator ()(A const &... a) 287 { 288 return result_of::funop< 289 expr(A const &...) 290 , expr 291 , default_domain 292 >::call(*this, a...); 293 } 294 }; 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 template<typename Tag , typename Arg0> 323 struct expr<Tag, list1<Arg0>, 1 > 324 { 325 typedef Tag proto_tag; 326 static const long proto_arity_c = 1; 327 typedef mpl::long_<1 > proto_arity; 328 typedef expr proto_base_expr; 329 typedef list1<Arg0> proto_args; 330 typedef basic_expr<Tag, proto_args, 1 > proto_grammar; 331 typedef default_domain proto_domain; 332 typedef default_generator proto_generator; 333 typedef proto::tag::proto_expr<Tag, proto_domain> fusion_tag; 334 typedef expr proto_derived_expr; 335 typedef void proto_is_expr_; 336 typedef Arg0 proto_child0; proto_child0 child0; 337 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; 338 339 340 BOOST_FORCEINLINE proto_baseexpr341 expr const &proto_base() const 342 { 343 return *this; 344 } 345 346 347 BOOST_FORCEINLINE proto_baseexpr348 expr &proto_base() 349 { 350 return *this; 351 } 352 353 354 355 template<typename A0> 356 BOOST_FORCEINLINE makeexpr357 static expr const make(A0 const &a0) 358 { 359 expr that = {a0}; 360 return that; 361 } 362 363 364 365 typedef typename detail::address_of_hack<Tag, proto_child0>::type address_of_hack_type_; 366 367 368 369 370 371 372 373 BOOST_FORCEINLINE operator address_of_hack_type_expr374 operator address_of_hack_type_() const 375 { 376 return boost::addressof(this->child0); 377 } 378 379 380 381 382 BOOST_FORCEINLINE 383 proto::expr< 384 proto::tag::assign 385 , list2<expr &, expr const &> 386 , 2 387 > const operator =expr388 operator =(expr const &a) 389 { 390 proto::expr< 391 proto::tag::assign 392 , list2<expr &, expr const &> 393 , 2 394 > that = {*this, a}; 395 return that; 396 } 397 398 399 400 401 template<typename A> 402 BOOST_FORCEINLINE 403 proto::expr< 404 proto::tag::assign 405 , list2<expr const &, typename result_of::as_child<A>::type> 406 , 2 407 > const operator =expr408 operator =(A &a) const 409 { 410 proto::expr< 411 proto::tag::assign 412 , list2<expr const &, typename result_of::as_child<A>::type> 413 , 2 414 > that = {*this, proto::as_child(a)}; 415 return that; 416 } 417 418 419 template<typename A> 420 BOOST_FORCEINLINE 421 proto::expr< 422 proto::tag::assign 423 , list2<expr const &, typename result_of::as_child<A const>::type> 424 , 2 425 > const operator =expr426 operator =(A const &a) const 427 { 428 proto::expr< 429 proto::tag::assign 430 , list2<expr const &, typename result_of::as_child<A const>::type> 431 , 2 432 > that = {*this, proto::as_child(a)}; 433 return that; 434 } 435 436 437 438 439 template<typename A> 440 BOOST_FORCEINLINE 441 proto::expr< 442 proto::tag::subscript 443 , list2<expr const &, typename result_of::as_child<A>::type> 444 , 2 445 > const operator []expr446 operator [](A &a) const 447 { 448 proto::expr< 449 proto::tag::subscript 450 , list2<expr const &, typename result_of::as_child<A>::type> 451 , 2 452 > that = {*this, proto::as_child(a)}; 453 return that; 454 } 455 456 457 template<typename A> 458 BOOST_FORCEINLINE 459 proto::expr< 460 proto::tag::subscript 461 , list2<expr const &, typename result_of::as_child<A const>::type> 462 , 2 463 > const operator []expr464 operator [](A const &a) const 465 { 466 proto::expr< 467 proto::tag::subscript 468 , list2<expr const &, typename result_of::as_child<A const>::type> 469 , 2 470 > that = {*this, proto::as_child(a)}; 471 return that; 472 } 473 474 475 template<typename Sig> 476 struct result 477 { 478 typedef typename result_of::funop<Sig, expr, default_domain>::type const type; 479 }; 480 481 482 template<typename ...A> 483 BOOST_FORCEINLINE 484 typename result_of::funop< 485 expr const(A const &...) 486 , expr 487 , default_domain 488 >::type const operator ()expr489 operator ()(A const &... a) const 490 { 491 return result_of::funop< 492 expr const(A const &...) 493 , expr 494 , default_domain 495 >::call(*this, a...); 496 } 497 }; 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 template<typename Tag , typename Arg0 , typename Arg1> 526 struct expr<Tag, list2<Arg0 , Arg1>, 2 > 527 { 528 typedef Tag proto_tag; 529 static const long proto_arity_c = 2; 530 typedef mpl::long_<2 > proto_arity; 531 typedef expr proto_base_expr; 532 typedef list2<Arg0 , Arg1> proto_args; 533 typedef basic_expr<Tag, proto_args, 2 > proto_grammar; 534 typedef default_domain proto_domain; 535 typedef default_generator proto_generator; 536 typedef proto::tag::proto_expr<Tag, proto_domain> fusion_tag; 537 typedef expr proto_derived_expr; 538 typedef void proto_is_expr_; 539 typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; 540 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; 541 542 543 BOOST_FORCEINLINE proto_baseexpr544 expr const &proto_base() const 545 { 546 return *this; 547 } 548 549 550 BOOST_FORCEINLINE proto_baseexpr551 expr &proto_base() 552 { 553 return *this; 554 } 555 556 557 558 template<typename A0 , typename A1> 559 BOOST_FORCEINLINE makeexpr560 static expr const make(A0 const &a0 , A1 const &a1) 561 { 562 expr that = {a0 , a1}; 563 return that; 564 } 565 566 567 typedef detail::not_a_valid_type address_of_hack_type_; 568 569 570 571 572 BOOST_FORCEINLINE 573 proto::expr< 574 proto::tag::assign 575 , list2<expr &, expr const &> 576 , 2 577 > const operator =expr578 operator =(expr const &a) 579 { 580 proto::expr< 581 proto::tag::assign 582 , list2<expr &, expr const &> 583 , 2 584 > that = {*this, a}; 585 return that; 586 } 587 588 589 590 591 template<typename A> 592 BOOST_FORCEINLINE 593 proto::expr< 594 proto::tag::assign 595 , list2<expr const &, typename result_of::as_child<A>::type> 596 , 2 597 > const operator =expr598 operator =(A &a) const 599 { 600 proto::expr< 601 proto::tag::assign 602 , list2<expr const &, typename result_of::as_child<A>::type> 603 , 2 604 > that = {*this, proto::as_child(a)}; 605 return that; 606 } 607 608 609 template<typename A> 610 BOOST_FORCEINLINE 611 proto::expr< 612 proto::tag::assign 613 , list2<expr const &, typename result_of::as_child<A const>::type> 614 , 2 615 > const operator =expr616 operator =(A const &a) const 617 { 618 proto::expr< 619 proto::tag::assign 620 , list2<expr const &, typename result_of::as_child<A const>::type> 621 , 2 622 > that = {*this, proto::as_child(a)}; 623 return that; 624 } 625 626 627 628 629 template<typename A> 630 BOOST_FORCEINLINE 631 proto::expr< 632 proto::tag::subscript 633 , list2<expr const &, typename result_of::as_child<A>::type> 634 , 2 635 > const operator []expr636 operator [](A &a) const 637 { 638 proto::expr< 639 proto::tag::subscript 640 , list2<expr const &, typename result_of::as_child<A>::type> 641 , 2 642 > that = {*this, proto::as_child(a)}; 643 return that; 644 } 645 646 647 template<typename A> 648 BOOST_FORCEINLINE 649 proto::expr< 650 proto::tag::subscript 651 , list2<expr const &, typename result_of::as_child<A const>::type> 652 , 2 653 > const operator []expr654 operator [](A const &a) const 655 { 656 proto::expr< 657 proto::tag::subscript 658 , list2<expr const &, typename result_of::as_child<A const>::type> 659 , 2 660 > that = {*this, proto::as_child(a)}; 661 return that; 662 } 663 664 665 template<typename Sig> 666 struct result 667 { 668 typedef typename result_of::funop<Sig, expr, default_domain>::type const type; 669 }; 670 671 672 template<typename ...A> 673 BOOST_FORCEINLINE 674 typename result_of::funop< 675 expr const(A const &...) 676 , expr 677 , default_domain 678 >::type const operator ()expr679 operator ()(A const &... a) const 680 { 681 return result_of::funop< 682 expr const(A const &...) 683 , expr 684 , default_domain 685 >::call(*this, a...); 686 } 687 }; 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2> 716 struct expr<Tag, list3<Arg0 , Arg1 , Arg2>, 3 > 717 { 718 typedef Tag proto_tag; 719 static const long proto_arity_c = 3; 720 typedef mpl::long_<3 > proto_arity; 721 typedef expr proto_base_expr; 722 typedef list3<Arg0 , Arg1 , Arg2> proto_args; 723 typedef basic_expr<Tag, proto_args, 3 > proto_grammar; 724 typedef default_domain proto_domain; 725 typedef default_generator proto_generator; 726 typedef proto::tag::proto_expr<Tag, proto_domain> fusion_tag; 727 typedef expr proto_derived_expr; 728 typedef void proto_is_expr_; 729 typedef Arg0 proto_child0; proto_child0 child0; typedef Arg1 proto_child1; proto_child1 child1; typedef Arg2 proto_child2; proto_child2 child2; 730 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; 731 732 733 BOOST_FORCEINLINE proto_baseexpr734 expr const &proto_base() const 735 { 736 return *this; 737 } 738 739 740 BOOST_FORCEINLINE proto_baseexpr741 expr &proto_base() 742 { 743 return *this; 744 } 745 746 747 748 template<typename A0 , typename A1 , typename A2> 749 BOOST_FORCEINLINE makeexpr750 static expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2) 751 { 752 expr that = {a0 , a1 , a2}; 753 return that; 754 } 755 756 757 typedef detail::not_a_valid_type address_of_hack_type_; 758 759 760 761 762 BOOST_FORCEINLINE 763 proto::expr< 764 proto::tag::assign 765 , list2<expr &, expr const &> 766 , 2 767 > const operator =expr768 operator =(expr const &a) 769 { 770 proto::expr< 771 proto::tag::assign 772 , list2<expr &, expr const &> 773 , 2 774 > that = {*this, a}; 775 return that; 776 } 777 778 779 780 781 template<typename A> 782 BOOST_FORCEINLINE 783 proto::expr< 784 proto::tag::assign 785 , list2<expr const &, typename result_of::as_child<A>::type> 786 , 2 787 > const operator =expr788 operator =(A &a) const 789 { 790 proto::expr< 791 proto::tag::assign 792 , list2<expr const &, typename result_of::as_child<A>::type> 793 , 2 794 > that = {*this, proto::as_child(a)}; 795 return that; 796 } 797 798 799 template<typename A> 800 BOOST_FORCEINLINE 801 proto::expr< 802 proto::tag::assign 803 , list2<expr const &, typename result_of::as_child<A const>::type> 804 , 2 805 > const operator =expr806 operator =(A const &a) const 807 { 808 proto::expr< 809 proto::tag::assign 810 , list2<expr const &, typename result_of::as_child<A const>::type> 811 , 2 812 > that = {*this, proto::as_child(a)}; 813 return that; 814 } 815 816 817 818 819 template<typename A> 820 BOOST_FORCEINLINE 821 proto::expr< 822 proto::tag::subscript 823 , list2<expr const &, typename result_of::as_child<A>::type> 824 , 2 825 > const operator []expr826 operator [](A &a) const 827 { 828 proto::expr< 829 proto::tag::subscript 830 , list2<expr const &, typename result_of::as_child<A>::type> 831 , 2 832 > that = {*this, proto::as_child(a)}; 833 return that; 834 } 835 836 837 template<typename A> 838 BOOST_FORCEINLINE 839 proto::expr< 840 proto::tag::subscript 841 , list2<expr const &, typename result_of::as_child<A const>::type> 842 , 2 843 > const operator []expr844 operator [](A const &a) const 845 { 846 proto::expr< 847 proto::tag::subscript 848 , list2<expr const &, typename result_of::as_child<A const>::type> 849 , 2 850 > that = {*this, proto::as_child(a)}; 851 return that; 852 } 853 854 855 template<typename Sig> 856 struct result 857 { 858 typedef typename result_of::funop<Sig, expr, default_domain>::type const type; 859 }; 860 861 862 template<typename ...A> 863 BOOST_FORCEINLINE 864 typename result_of::funop< 865 expr const(A const &...) 866 , expr 867 , default_domain 868 >::type const operator ()expr869 operator ()(A const &... a) const 870 { 871 return result_of::funop< 872 expr const(A const &...) 873 , expr 874 , default_domain 875 >::call(*this, a...); 876 } 877 }; 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3> 906 struct expr<Tag, list4<Arg0 , Arg1 , Arg2 , Arg3>, 4 > 907 { 908 typedef Tag proto_tag; 909 static const long proto_arity_c = 4; 910 typedef mpl::long_<4 > proto_arity; 911 typedef expr proto_base_expr; 912 typedef list4<Arg0 , Arg1 , Arg2 , Arg3> proto_args; 913 typedef basic_expr<Tag, proto_args, 4 > proto_grammar; 914 typedef default_domain proto_domain; 915 typedef default_generator proto_generator; 916 typedef proto::tag::proto_expr<Tag, proto_domain> fusion_tag; 917 typedef expr proto_derived_expr; 918 typedef void proto_is_expr_; 919 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; 920 typedef void proto_child4; typedef void proto_child5; typedef void proto_child6; typedef void proto_child7; typedef void proto_child8; typedef void proto_child9; 921 922 923 BOOST_FORCEINLINE proto_baseexpr924 expr const &proto_base() const 925 { 926 return *this; 927 } 928 929 930 BOOST_FORCEINLINE proto_baseexpr931 expr &proto_base() 932 { 933 return *this; 934 } 935 936 937 938 template<typename A0 , typename A1 , typename A2 , typename A3> 939 BOOST_FORCEINLINE makeexpr940 static expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3) 941 { 942 expr that = {a0 , a1 , a2 , a3}; 943 return that; 944 } 945 946 947 typedef detail::not_a_valid_type address_of_hack_type_; 948 949 950 951 952 BOOST_FORCEINLINE 953 proto::expr< 954 proto::tag::assign 955 , list2<expr &, expr const &> 956 , 2 957 > const operator =expr958 operator =(expr const &a) 959 { 960 proto::expr< 961 proto::tag::assign 962 , list2<expr &, expr const &> 963 , 2 964 > that = {*this, a}; 965 return that; 966 } 967 968 969 970 971 template<typename A> 972 BOOST_FORCEINLINE 973 proto::expr< 974 proto::tag::assign 975 , list2<expr const &, typename result_of::as_child<A>::type> 976 , 2 977 > const operator =expr978 operator =(A &a) const 979 { 980 proto::expr< 981 proto::tag::assign 982 , list2<expr const &, typename result_of::as_child<A>::type> 983 , 2 984 > that = {*this, proto::as_child(a)}; 985 return that; 986 } 987 988 989 template<typename A> 990 BOOST_FORCEINLINE 991 proto::expr< 992 proto::tag::assign 993 , list2<expr const &, typename result_of::as_child<A const>::type> 994 , 2 995 > const operator =expr996 operator =(A const &a) const 997 { 998 proto::expr< 999 proto::tag::assign 1000 , list2<expr const &, typename result_of::as_child<A const>::type> 1001 , 2 1002 > that = {*this, proto::as_child(a)}; 1003 return that; 1004 } 1005 1006 1007 1008 1009 template<typename A> 1010 BOOST_FORCEINLINE 1011 proto::expr< 1012 proto::tag::subscript 1013 , list2<expr const &, typename result_of::as_child<A>::type> 1014 , 2 1015 > const operator []expr1016 operator [](A &a) const 1017 { 1018 proto::expr< 1019 proto::tag::subscript 1020 , list2<expr const &, typename result_of::as_child<A>::type> 1021 , 2 1022 > that = {*this, proto::as_child(a)}; 1023 return that; 1024 } 1025 1026 1027 template<typename A> 1028 BOOST_FORCEINLINE 1029 proto::expr< 1030 proto::tag::subscript 1031 , list2<expr const &, typename result_of::as_child<A const>::type> 1032 , 2 1033 > const operator []expr1034 operator [](A const &a) const 1035 { 1036 proto::expr< 1037 proto::tag::subscript 1038 , list2<expr const &, typename result_of::as_child<A const>::type> 1039 , 2 1040 > that = {*this, proto::as_child(a)}; 1041 return that; 1042 } 1043 1044 1045 template<typename Sig> 1046 struct result 1047 { 1048 typedef typename result_of::funop<Sig, expr, default_domain>::type const type; 1049 }; 1050 1051 1052 template<typename ...A> 1053 BOOST_FORCEINLINE 1054 typename result_of::funop< 1055 expr const(A const &...) 1056 , expr 1057 , default_domain 1058 >::type const operator ()expr1059 operator ()(A const &... a) const 1060 { 1061 return result_of::funop< 1062 expr const(A const &...) 1063 , expr 1064 , default_domain 1065 >::call(*this, a...); 1066 } 1067 }; 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4> 1096 struct expr<Tag, list5<Arg0 , Arg1 , Arg2 , Arg3 , Arg4>, 5 > 1097 { 1098 typedef Tag proto_tag; 1099 static const long proto_arity_c = 5; 1100 typedef mpl::long_<5 > proto_arity; 1101 typedef expr proto_base_expr; 1102 typedef list5<Arg0 , Arg1 , Arg2 , Arg3 , Arg4> proto_args; 1103 typedef basic_expr<Tag, proto_args, 5 > proto_grammar; 1104 typedef default_domain proto_domain; 1105 typedef default_generator proto_generator; 1106 typedef proto::tag::proto_expr<Tag, proto_domain> fusion_tag; 1107 typedef expr proto_derived_expr; 1108 typedef void proto_is_expr_; 1109 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; 1110 typedef void proto_child5; typedef void proto_child6; typedef void proto_child7; typedef void proto_child8; typedef void proto_child9; 1111 1112 1113 BOOST_FORCEINLINE proto_baseexpr1114 expr const &proto_base() const 1115 { 1116 return *this; 1117 } 1118 1119 1120 BOOST_FORCEINLINE proto_baseexpr1121 expr &proto_base() 1122 { 1123 return *this; 1124 } 1125 1126 1127 1128 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4> 1129 BOOST_FORCEINLINE makeexpr1130 static expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4) 1131 { 1132 expr that = {a0 , a1 , a2 , a3 , a4}; 1133 return that; 1134 } 1135 1136 1137 typedef detail::not_a_valid_type address_of_hack_type_; 1138 1139 1140 1141 1142 BOOST_FORCEINLINE 1143 proto::expr< 1144 proto::tag::assign 1145 , list2<expr &, expr const &> 1146 , 2 1147 > const operator =expr1148 operator =(expr const &a) 1149 { 1150 proto::expr< 1151 proto::tag::assign 1152 , list2<expr &, expr const &> 1153 , 2 1154 > that = {*this, a}; 1155 return that; 1156 } 1157 1158 1159 1160 1161 template<typename A> 1162 BOOST_FORCEINLINE 1163 proto::expr< 1164 proto::tag::assign 1165 , list2<expr const &, typename result_of::as_child<A>::type> 1166 , 2 1167 > const operator =expr1168 operator =(A &a) const 1169 { 1170 proto::expr< 1171 proto::tag::assign 1172 , list2<expr const &, typename result_of::as_child<A>::type> 1173 , 2 1174 > that = {*this, proto::as_child(a)}; 1175 return that; 1176 } 1177 1178 1179 template<typename A> 1180 BOOST_FORCEINLINE 1181 proto::expr< 1182 proto::tag::assign 1183 , list2<expr const &, typename result_of::as_child<A const>::type> 1184 , 2 1185 > const operator =expr1186 operator =(A const &a) const 1187 { 1188 proto::expr< 1189 proto::tag::assign 1190 , list2<expr const &, typename result_of::as_child<A const>::type> 1191 , 2 1192 > that = {*this, proto::as_child(a)}; 1193 return that; 1194 } 1195 1196 1197 1198 1199 template<typename A> 1200 BOOST_FORCEINLINE 1201 proto::expr< 1202 proto::tag::subscript 1203 , list2<expr const &, typename result_of::as_child<A>::type> 1204 , 2 1205 > const operator []expr1206 operator [](A &a) const 1207 { 1208 proto::expr< 1209 proto::tag::subscript 1210 , list2<expr const &, typename result_of::as_child<A>::type> 1211 , 2 1212 > that = {*this, proto::as_child(a)}; 1213 return that; 1214 } 1215 1216 1217 template<typename A> 1218 BOOST_FORCEINLINE 1219 proto::expr< 1220 proto::tag::subscript 1221 , list2<expr const &, typename result_of::as_child<A const>::type> 1222 , 2 1223 > const operator []expr1224 operator [](A const &a) const 1225 { 1226 proto::expr< 1227 proto::tag::subscript 1228 , list2<expr const &, typename result_of::as_child<A const>::type> 1229 , 2 1230 > that = {*this, proto::as_child(a)}; 1231 return that; 1232 } 1233 1234 1235 template<typename Sig> 1236 struct result 1237 { 1238 typedef typename result_of::funop<Sig, expr, default_domain>::type const type; 1239 }; 1240 1241 1242 template<typename ...A> 1243 BOOST_FORCEINLINE 1244 typename result_of::funop< 1245 expr const(A const &...) 1246 , expr 1247 , default_domain 1248 >::type const operator ()expr1249 operator ()(A const &... a) const 1250 { 1251 return result_of::funop< 1252 expr const(A const &...) 1253 , expr 1254 , default_domain 1255 >::call(*this, a...); 1256 } 1257 }; 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5> 1286 struct expr<Tag, list6<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5>, 6 > 1287 { 1288 typedef Tag proto_tag; 1289 static const long proto_arity_c = 6; 1290 typedef mpl::long_<6 > proto_arity; 1291 typedef expr proto_base_expr; 1292 typedef list6<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5> proto_args; 1293 typedef basic_expr<Tag, proto_args, 6 > proto_grammar; 1294 typedef default_domain proto_domain; 1295 typedef default_generator proto_generator; 1296 typedef proto::tag::proto_expr<Tag, proto_domain> fusion_tag; 1297 typedef expr proto_derived_expr; 1298 typedef void proto_is_expr_; 1299 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; 1300 typedef void proto_child6; typedef void proto_child7; typedef void proto_child8; typedef void proto_child9; 1301 1302 1303 BOOST_FORCEINLINE proto_baseexpr1304 expr const &proto_base() const 1305 { 1306 return *this; 1307 } 1308 1309 1310 BOOST_FORCEINLINE proto_baseexpr1311 expr &proto_base() 1312 { 1313 return *this; 1314 } 1315 1316 1317 1318 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5> 1319 BOOST_FORCEINLINE makeexpr1320 static expr const make(A0 const &a0 , A1 const &a1 , A2 const &a2 , A3 const &a3 , A4 const &a4 , A5 const &a5) 1321 { 1322 expr that = {a0 , a1 , a2 , a3 , a4 , a5}; 1323 return that; 1324 } 1325 1326 1327 typedef detail::not_a_valid_type address_of_hack_type_; 1328 1329 1330 1331 1332 BOOST_FORCEINLINE 1333 proto::expr< 1334 proto::tag::assign 1335 , list2<expr &, expr const &> 1336 , 2 1337 > const operator =expr1338 operator =(expr const &a) 1339 { 1340 proto::expr< 1341 proto::tag::assign 1342 , list2<expr &, expr const &> 1343 , 2 1344 > that = {*this, a}; 1345 return that; 1346 } 1347 1348 1349 1350 1351 template<typename A> 1352 BOOST_FORCEINLINE 1353 proto::expr< 1354 proto::tag::assign 1355 , list2<expr const &, typename result_of::as_child<A>::type> 1356 , 2 1357 > const operator =expr1358 operator =(A &a) const 1359 { 1360 proto::expr< 1361 proto::tag::assign 1362 , list2<expr const &, typename result_of::as_child<A>::type> 1363 , 2 1364 > that = {*this, proto::as_child(a)}; 1365 return that; 1366 } 1367 1368 1369 template<typename A> 1370 BOOST_FORCEINLINE 1371 proto::expr< 1372 proto::tag::assign 1373 , list2<expr const &, typename result_of::as_child<A const>::type> 1374 , 2 1375 > const operator =expr1376 operator =(A const &a) const 1377 { 1378 proto::expr< 1379 proto::tag::assign 1380 , list2<expr const &, typename result_of::as_child<A const>::type> 1381 , 2 1382 > that = {*this, proto::as_child(a)}; 1383 return that; 1384 } 1385 1386 1387 1388 1389 template<typename A> 1390 BOOST_FORCEINLINE 1391 proto::expr< 1392 proto::tag::subscript 1393 , list2<expr const &, typename result_of::as_child<A>::type> 1394 , 2 1395 > const operator []expr1396 operator [](A &a) const 1397 { 1398 proto::expr< 1399 proto::tag::subscript 1400 , list2<expr const &, typename result_of::as_child<A>::type> 1401 , 2 1402 > that = {*this, proto::as_child(a)}; 1403 return that; 1404 } 1405 1406 1407 template<typename A> 1408 BOOST_FORCEINLINE 1409 proto::expr< 1410 proto::tag::subscript 1411 , list2<expr const &, typename result_of::as_child<A const>::type> 1412 , 2 1413 > const operator []expr1414 operator [](A const &a) const 1415 { 1416 proto::expr< 1417 proto::tag::subscript 1418 , list2<expr const &, typename result_of::as_child<A const>::type> 1419 , 2 1420 > that = {*this, proto::as_child(a)}; 1421 return that; 1422 } 1423 1424 1425 template<typename Sig> 1426 struct result 1427 { 1428 typedef typename result_of::funop<Sig, expr, default_domain>::type const type; 1429 }; 1430 1431 1432 template<typename ...A> 1433 BOOST_FORCEINLINE 1434 typename result_of::funop< 1435 expr const(A const &...) 1436 , expr 1437 , default_domain 1438 >::type const operator ()expr1439 operator ()(A const &... a) const 1440 { 1441 return result_of::funop< 1442 expr const(A const &...) 1443 , expr 1444 , default_domain 1445 >::call(*this, a...); 1446 } 1447 }; 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6> 1476 struct expr<Tag, list7<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6>, 7 > 1477 { 1478 typedef Tag proto_tag; 1479 static const long proto_arity_c = 7; 1480 typedef mpl::long_<7 > proto_arity; 1481 typedef expr proto_base_expr; 1482 typedef list7<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6> proto_args; 1483 typedef basic_expr<Tag, proto_args, 7 > proto_grammar; 1484 typedef default_domain proto_domain; 1485 typedef default_generator proto_generator; 1486 typedef proto::tag::proto_expr<Tag, proto_domain> fusion_tag; 1487 typedef expr proto_derived_expr; 1488 typedef void proto_is_expr_; 1489 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; 1490 typedef void proto_child7; typedef void proto_child8; typedef void proto_child9; 1491 1492 1493 BOOST_FORCEINLINE proto_baseexpr1494 expr const &proto_base() const 1495 { 1496 return *this; 1497 } 1498 1499 1500 BOOST_FORCEINLINE proto_baseexpr1501 expr &proto_base() 1502 { 1503 return *this; 1504 } 1505 1506 1507 1508 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6> 1509 BOOST_FORCEINLINE makeexpr1510 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) 1511 { 1512 expr that = {a0 , a1 , a2 , a3 , a4 , a5 , a6}; 1513 return that; 1514 } 1515 1516 1517 typedef detail::not_a_valid_type address_of_hack_type_; 1518 1519 1520 1521 1522 BOOST_FORCEINLINE 1523 proto::expr< 1524 proto::tag::assign 1525 , list2<expr &, expr const &> 1526 , 2 1527 > const operator =expr1528 operator =(expr const &a) 1529 { 1530 proto::expr< 1531 proto::tag::assign 1532 , list2<expr &, expr const &> 1533 , 2 1534 > that = {*this, a}; 1535 return that; 1536 } 1537 1538 1539 1540 1541 template<typename A> 1542 BOOST_FORCEINLINE 1543 proto::expr< 1544 proto::tag::assign 1545 , list2<expr const &, typename result_of::as_child<A>::type> 1546 , 2 1547 > const operator =expr1548 operator =(A &a) const 1549 { 1550 proto::expr< 1551 proto::tag::assign 1552 , list2<expr const &, typename result_of::as_child<A>::type> 1553 , 2 1554 > that = {*this, proto::as_child(a)}; 1555 return that; 1556 } 1557 1558 1559 template<typename A> 1560 BOOST_FORCEINLINE 1561 proto::expr< 1562 proto::tag::assign 1563 , list2<expr const &, typename result_of::as_child<A const>::type> 1564 , 2 1565 > const operator =expr1566 operator =(A const &a) const 1567 { 1568 proto::expr< 1569 proto::tag::assign 1570 , list2<expr const &, typename result_of::as_child<A const>::type> 1571 , 2 1572 > that = {*this, proto::as_child(a)}; 1573 return that; 1574 } 1575 1576 1577 1578 1579 template<typename A> 1580 BOOST_FORCEINLINE 1581 proto::expr< 1582 proto::tag::subscript 1583 , list2<expr const &, typename result_of::as_child<A>::type> 1584 , 2 1585 > const operator []expr1586 operator [](A &a) const 1587 { 1588 proto::expr< 1589 proto::tag::subscript 1590 , list2<expr const &, typename result_of::as_child<A>::type> 1591 , 2 1592 > that = {*this, proto::as_child(a)}; 1593 return that; 1594 } 1595 1596 1597 template<typename A> 1598 BOOST_FORCEINLINE 1599 proto::expr< 1600 proto::tag::subscript 1601 , list2<expr const &, typename result_of::as_child<A const>::type> 1602 , 2 1603 > const operator []expr1604 operator [](A const &a) const 1605 { 1606 proto::expr< 1607 proto::tag::subscript 1608 , list2<expr const &, typename result_of::as_child<A const>::type> 1609 , 2 1610 > that = {*this, proto::as_child(a)}; 1611 return that; 1612 } 1613 1614 1615 template<typename Sig> 1616 struct result 1617 { 1618 typedef typename result_of::funop<Sig, expr, default_domain>::type const type; 1619 }; 1620 1621 1622 template<typename ...A> 1623 BOOST_FORCEINLINE 1624 typename result_of::funop< 1625 expr const(A const &...) 1626 , expr 1627 , default_domain 1628 >::type const operator ()expr1629 operator ()(A const &... a) const 1630 { 1631 return result_of::funop< 1632 expr const(A const &...) 1633 , expr 1634 , default_domain 1635 >::call(*this, a...); 1636 } 1637 }; 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7> 1666 struct expr<Tag, list8<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7>, 8 > 1667 { 1668 typedef Tag proto_tag; 1669 static const long proto_arity_c = 8; 1670 typedef mpl::long_<8 > proto_arity; 1671 typedef expr proto_base_expr; 1672 typedef list8<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7> proto_args; 1673 typedef basic_expr<Tag, proto_args, 8 > proto_grammar; 1674 typedef default_domain proto_domain; 1675 typedef default_generator proto_generator; 1676 typedef proto::tag::proto_expr<Tag, proto_domain> fusion_tag; 1677 typedef expr proto_derived_expr; 1678 typedef void proto_is_expr_; 1679 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; 1680 typedef void proto_child8; typedef void proto_child9; 1681 1682 1683 BOOST_FORCEINLINE proto_baseexpr1684 expr const &proto_base() const 1685 { 1686 return *this; 1687 } 1688 1689 1690 BOOST_FORCEINLINE proto_baseexpr1691 expr &proto_base() 1692 { 1693 return *this; 1694 } 1695 1696 1697 1698 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7> 1699 BOOST_FORCEINLINE makeexpr1700 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) 1701 { 1702 expr that = {a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7}; 1703 return that; 1704 } 1705 1706 1707 typedef detail::not_a_valid_type address_of_hack_type_; 1708 1709 1710 1711 1712 BOOST_FORCEINLINE 1713 proto::expr< 1714 proto::tag::assign 1715 , list2<expr &, expr const &> 1716 , 2 1717 > const operator =expr1718 operator =(expr const &a) 1719 { 1720 proto::expr< 1721 proto::tag::assign 1722 , list2<expr &, expr const &> 1723 , 2 1724 > that = {*this, a}; 1725 return that; 1726 } 1727 1728 1729 1730 1731 template<typename A> 1732 BOOST_FORCEINLINE 1733 proto::expr< 1734 proto::tag::assign 1735 , list2<expr const &, typename result_of::as_child<A>::type> 1736 , 2 1737 > const operator =expr1738 operator =(A &a) const 1739 { 1740 proto::expr< 1741 proto::tag::assign 1742 , list2<expr const &, typename result_of::as_child<A>::type> 1743 , 2 1744 > that = {*this, proto::as_child(a)}; 1745 return that; 1746 } 1747 1748 1749 template<typename A> 1750 BOOST_FORCEINLINE 1751 proto::expr< 1752 proto::tag::assign 1753 , list2<expr const &, typename result_of::as_child<A const>::type> 1754 , 2 1755 > const operator =expr1756 operator =(A const &a) const 1757 { 1758 proto::expr< 1759 proto::tag::assign 1760 , list2<expr const &, typename result_of::as_child<A const>::type> 1761 , 2 1762 > that = {*this, proto::as_child(a)}; 1763 return that; 1764 } 1765 1766 1767 1768 1769 template<typename A> 1770 BOOST_FORCEINLINE 1771 proto::expr< 1772 proto::tag::subscript 1773 , list2<expr const &, typename result_of::as_child<A>::type> 1774 , 2 1775 > const operator []expr1776 operator [](A &a) const 1777 { 1778 proto::expr< 1779 proto::tag::subscript 1780 , list2<expr const &, typename result_of::as_child<A>::type> 1781 , 2 1782 > that = {*this, proto::as_child(a)}; 1783 return that; 1784 } 1785 1786 1787 template<typename A> 1788 BOOST_FORCEINLINE 1789 proto::expr< 1790 proto::tag::subscript 1791 , list2<expr const &, typename result_of::as_child<A const>::type> 1792 , 2 1793 > const operator []expr1794 operator [](A const &a) const 1795 { 1796 proto::expr< 1797 proto::tag::subscript 1798 , list2<expr const &, typename result_of::as_child<A const>::type> 1799 , 2 1800 > that = {*this, proto::as_child(a)}; 1801 return that; 1802 } 1803 1804 1805 template<typename Sig> 1806 struct result 1807 { 1808 typedef typename result_of::funop<Sig, expr, default_domain>::type const type; 1809 }; 1810 1811 1812 template<typename ...A> 1813 BOOST_FORCEINLINE 1814 typename result_of::funop< 1815 expr const(A const &...) 1816 , expr 1817 , default_domain 1818 >::type const operator ()expr1819 operator ()(A const &... a) const 1820 { 1821 return result_of::funop< 1822 expr const(A const &...) 1823 , expr 1824 , default_domain 1825 >::call(*this, a...); 1826 } 1827 }; 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8> 1856 struct expr<Tag, list9<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8>, 9 > 1857 { 1858 typedef Tag proto_tag; 1859 static const long proto_arity_c = 9; 1860 typedef mpl::long_<9 > proto_arity; 1861 typedef expr proto_base_expr; 1862 typedef list9<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8> proto_args; 1863 typedef basic_expr<Tag, proto_args, 9 > proto_grammar; 1864 typedef default_domain proto_domain; 1865 typedef default_generator proto_generator; 1866 typedef proto::tag::proto_expr<Tag, proto_domain> fusion_tag; 1867 typedef expr proto_derived_expr; 1868 typedef void proto_is_expr_; 1869 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; 1870 typedef void proto_child9; 1871 1872 1873 BOOST_FORCEINLINE proto_baseexpr1874 expr const &proto_base() const 1875 { 1876 return *this; 1877 } 1878 1879 1880 BOOST_FORCEINLINE proto_baseexpr1881 expr &proto_base() 1882 { 1883 return *this; 1884 } 1885 1886 1887 1888 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8> 1889 BOOST_FORCEINLINE makeexpr1890 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) 1891 { 1892 expr that = {a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8}; 1893 return that; 1894 } 1895 1896 1897 typedef detail::not_a_valid_type address_of_hack_type_; 1898 1899 1900 1901 1902 BOOST_FORCEINLINE 1903 proto::expr< 1904 proto::tag::assign 1905 , list2<expr &, expr const &> 1906 , 2 1907 > const operator =expr1908 operator =(expr const &a) 1909 { 1910 proto::expr< 1911 proto::tag::assign 1912 , list2<expr &, expr const &> 1913 , 2 1914 > that = {*this, a}; 1915 return that; 1916 } 1917 1918 1919 1920 1921 template<typename A> 1922 BOOST_FORCEINLINE 1923 proto::expr< 1924 proto::tag::assign 1925 , list2<expr const &, typename result_of::as_child<A>::type> 1926 , 2 1927 > const operator =expr1928 operator =(A &a) const 1929 { 1930 proto::expr< 1931 proto::tag::assign 1932 , list2<expr const &, typename result_of::as_child<A>::type> 1933 , 2 1934 > that = {*this, proto::as_child(a)}; 1935 return that; 1936 } 1937 1938 1939 template<typename A> 1940 BOOST_FORCEINLINE 1941 proto::expr< 1942 proto::tag::assign 1943 , list2<expr const &, typename result_of::as_child<A const>::type> 1944 , 2 1945 > const operator =expr1946 operator =(A const &a) const 1947 { 1948 proto::expr< 1949 proto::tag::assign 1950 , list2<expr const &, typename result_of::as_child<A const>::type> 1951 , 2 1952 > that = {*this, proto::as_child(a)}; 1953 return that; 1954 } 1955 1956 1957 1958 1959 template<typename A> 1960 BOOST_FORCEINLINE 1961 proto::expr< 1962 proto::tag::subscript 1963 , list2<expr const &, typename result_of::as_child<A>::type> 1964 , 2 1965 > const operator []expr1966 operator [](A &a) const 1967 { 1968 proto::expr< 1969 proto::tag::subscript 1970 , list2<expr const &, typename result_of::as_child<A>::type> 1971 , 2 1972 > that = {*this, proto::as_child(a)}; 1973 return that; 1974 } 1975 1976 1977 template<typename A> 1978 BOOST_FORCEINLINE 1979 proto::expr< 1980 proto::tag::subscript 1981 , list2<expr const &, typename result_of::as_child<A const>::type> 1982 , 2 1983 > const operator []expr1984 operator [](A const &a) const 1985 { 1986 proto::expr< 1987 proto::tag::subscript 1988 , list2<expr const &, typename result_of::as_child<A const>::type> 1989 , 2 1990 > that = {*this, proto::as_child(a)}; 1991 return that; 1992 } 1993 1994 1995 template<typename Sig> 1996 struct result 1997 { 1998 typedef typename result_of::funop<Sig, expr, default_domain>::type const type; 1999 }; 2000 2001 2002 template<typename ...A> 2003 BOOST_FORCEINLINE 2004 typename result_of::funop< 2005 expr const(A const &...) 2006 , expr 2007 , default_domain 2008 >::type const operator ()expr2009 operator ()(A const &... a) const 2010 { 2011 return result_of::funop< 2012 expr const(A const &...) 2013 , expr 2014 , default_domain 2015 >::call(*this, a...); 2016 } 2017 }; 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 template<typename Tag , typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8 , typename Arg9> 2046 struct expr<Tag, list10<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8 , Arg9>, 10 > 2047 { 2048 typedef Tag proto_tag; 2049 static const long proto_arity_c = 10; 2050 typedef mpl::long_<10 > proto_arity; 2051 typedef expr proto_base_expr; 2052 typedef list10<Arg0 , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8 , Arg9> proto_args; 2053 typedef basic_expr<Tag, proto_args, 10 > proto_grammar; 2054 typedef default_domain proto_domain; 2055 typedef default_generator proto_generator; 2056 typedef proto::tag::proto_expr<Tag, proto_domain> fusion_tag; 2057 typedef expr proto_derived_expr; 2058 typedef void proto_is_expr_; 2059 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; 2060 2061 2062 2063 BOOST_FORCEINLINE proto_baseexpr2064 expr const &proto_base() const 2065 { 2066 return *this; 2067 } 2068 2069 2070 BOOST_FORCEINLINE proto_baseexpr2071 expr &proto_base() 2072 { 2073 return *this; 2074 } 2075 2076 2077 2078 template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9> 2079 BOOST_FORCEINLINE makeexpr2080 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) 2081 { 2082 expr that = {a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9}; 2083 return that; 2084 } 2085 2086 2087 typedef detail::not_a_valid_type address_of_hack_type_; 2088 2089 2090 2091 2092 BOOST_FORCEINLINE 2093 proto::expr< 2094 proto::tag::assign 2095 , list2<expr &, expr const &> 2096 , 2 2097 > const operator =expr2098 operator =(expr const &a) 2099 { 2100 proto::expr< 2101 proto::tag::assign 2102 , list2<expr &, expr const &> 2103 , 2 2104 > that = {*this, a}; 2105 return that; 2106 } 2107 2108 2109 2110 2111 template<typename A> 2112 BOOST_FORCEINLINE 2113 proto::expr< 2114 proto::tag::assign 2115 , list2<expr const &, typename result_of::as_child<A>::type> 2116 , 2 2117 > const operator =expr2118 operator =(A &a) const 2119 { 2120 proto::expr< 2121 proto::tag::assign 2122 , list2<expr const &, typename result_of::as_child<A>::type> 2123 , 2 2124 > that = {*this, proto::as_child(a)}; 2125 return that; 2126 } 2127 2128 2129 template<typename A> 2130 BOOST_FORCEINLINE 2131 proto::expr< 2132 proto::tag::assign 2133 , list2<expr const &, typename result_of::as_child<A const>::type> 2134 , 2 2135 > const operator =expr2136 operator =(A const &a) const 2137 { 2138 proto::expr< 2139 proto::tag::assign 2140 , list2<expr const &, typename result_of::as_child<A const>::type> 2141 , 2 2142 > that = {*this, proto::as_child(a)}; 2143 return that; 2144 } 2145 2146 2147 2148 2149 template<typename A> 2150 BOOST_FORCEINLINE 2151 proto::expr< 2152 proto::tag::subscript 2153 , list2<expr const &, typename result_of::as_child<A>::type> 2154 , 2 2155 > const operator []expr2156 operator [](A &a) const 2157 { 2158 proto::expr< 2159 proto::tag::subscript 2160 , list2<expr const &, typename result_of::as_child<A>::type> 2161 , 2 2162 > that = {*this, proto::as_child(a)}; 2163 return that; 2164 } 2165 2166 2167 template<typename A> 2168 BOOST_FORCEINLINE 2169 proto::expr< 2170 proto::tag::subscript 2171 , list2<expr const &, typename result_of::as_child<A const>::type> 2172 , 2 2173 > const operator []expr2174 operator [](A const &a) const 2175 { 2176 proto::expr< 2177 proto::tag::subscript 2178 , list2<expr const &, typename result_of::as_child<A const>::type> 2179 , 2 2180 > that = {*this, proto::as_child(a)}; 2181 return that; 2182 } 2183 2184 2185 template<typename Sig> 2186 struct result 2187 { 2188 typedef typename result_of::funop<Sig, expr, default_domain>::type const type; 2189 }; 2190 2191 2192 template<typename ...A> 2193 BOOST_FORCEINLINE 2194 typename result_of::funop< 2195 expr const(A const &...) 2196 , expr 2197 , default_domain 2198 >::type const operator ()expr2199 operator ()(A const &... a) const 2200 { 2201 return result_of::funop< 2202 expr const(A const &...) 2203 , expr 2204 , default_domain 2205 >::call(*this, a...); 2206 } 2207 }; 2208 2209