File indexing completed on 2025-12-16 10:09:07
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef BOOST_SPIRIT_CLASSIC_PHOENIX_OPERATORS_HPP
0009 #define BOOST_SPIRIT_CLASSIC_PHOENIX_OPERATORS_HPP
0010
0011
0012 #if !defined(BOOST_NO_CWCTYPE)
0013 #include <cwctype>
0014 #endif
0015
0016 #if (defined(__BORLANDC__) && !defined(__clang__)) || (defined(__ICL) && __ICL >= 700)
0017 #define CREF const&
0018 #else
0019 #define CREF
0020 #endif
0021
0022 #include <climits>
0023 #include <boost/spirit/home/classic/phoenix/actor.hpp>
0024 #include <boost/spirit/home/classic/phoenix/composite.hpp>
0025 #include <boost/config.hpp>
0026 #include <boost/mpl/if.hpp>
0027
0028
0029 namespace phoenix {
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069
0070
0071
0072
0073
0074
0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137
0138
0139
0140
0141
0142
0143
0144
0145
0146
0147
0148
0149
0150
0151
0152
0153
0154
0155
0156
0157
0158
0159
0160
0161
0162
0163
0164
0165
0166
0167
0168
0169 struct negative_op; struct positive_op;
0170 struct logical_not_op; struct invert_op;
0171 struct reference_op; struct dereference_op;
0172 struct pre_incr_op; struct pre_decr_op;
0173 struct post_incr_op; struct post_decr_op;
0174
0175
0176
0177 struct assign_op; struct index_op;
0178 struct plus_assign_op; struct minus_assign_op;
0179 struct times_assign_op; struct divide_assign_op; struct mod_assign_op;
0180 struct and_assign_op; struct or_assign_op; struct xor_assign_op;
0181 struct shift_l_assign_op; struct shift_r_assign_op;
0182
0183 struct plus_op; struct minus_op;
0184 struct times_op; struct divide_op; struct mod_op;
0185 struct and_op; struct or_op; struct xor_op;
0186 struct shift_l_op; struct shift_r_op;
0187
0188 struct eq_op; struct not_eq_op;
0189 struct lt_op; struct lt_eq_op;
0190 struct gt_op; struct gt_eq_op;
0191 struct logical_and_op; struct logical_or_op;
0192
0193
0194
0195
0196
0197
0198
0199
0200
0201
0202
0203
0204
0205
0206
0207
0208
0209
0210
0211
0212
0213
0214
0215
0216
0217 template <typename TagT, typename T>
0218 struct unary_operator;
0219
0220
0221 template <typename T>
0222 struct unary_operator<negative_op, T> {
0223
0224 typedef T const result_type;
0225 static result_type eval(T const& v)
0226 { return -v; }
0227 };
0228
0229
0230 template <typename T>
0231 struct unary_operator<positive_op, T> {
0232
0233 typedef T const result_type;
0234 static result_type eval(T const& v)
0235 { return +v; }
0236 };
0237
0238
0239 template <typename T>
0240 struct unary_operator<logical_not_op, T> {
0241
0242 typedef T const result_type;
0243 static result_type eval(T const& v)
0244 { return !v; }
0245 };
0246
0247
0248 template <typename T>
0249 struct unary_operator<invert_op, T> {
0250
0251 typedef T const result_type;
0252 static result_type eval(T const& v)
0253 { return ~v; }
0254 };
0255
0256
0257 template <typename T>
0258 struct unary_operator<reference_op, T> {
0259
0260 typedef T* result_type;
0261 static result_type eval(T& v)
0262 { return &v; }
0263 };
0264
0265
0266 template <typename T>
0267 struct unary_operator<dereference_op, T*> {
0268
0269 typedef T& result_type;
0270 static result_type eval(T* v)
0271 { return *v; }
0272 };
0273
0274
0275 template <typename T>
0276 struct unary_operator<dereference_op, T* const> {
0277
0278 typedef T& result_type;
0279 static result_type eval(T* const v)
0280 { return *v; }
0281 };
0282
0283
0284 template <>
0285 struct unary_operator<dereference_op, nil_t> {
0286
0287
0288
0289 typedef nil_t result_type;
0290 };
0291
0292
0293 #ifndef BOOST_BORLANDC
0294 template <>
0295 struct unary_operator<dereference_op, nil_t const> {
0296
0297
0298
0299 typedef nil_t result_type;
0300 };
0301 #endif
0302
0303
0304 template <typename T>
0305 struct unary_operator<pre_incr_op, T> {
0306
0307 typedef T& result_type;
0308 static result_type eval(T& v)
0309 { return ++v; }
0310 };
0311
0312
0313 template <typename T>
0314 struct unary_operator<pre_decr_op, T> {
0315
0316 typedef T& result_type;
0317 static result_type eval(T& v)
0318 { return --v; }
0319 };
0320
0321
0322 template <typename T>
0323 struct unary_operator<post_incr_op, T> {
0324
0325 typedef T const result_type;
0326 static result_type eval(T& v)
0327 { T t(v); ++v; return t; }
0328 };
0329
0330
0331 template <typename T>
0332 struct unary_operator<post_decr_op, T> {
0333
0334 typedef T const result_type;
0335 static result_type eval(T& v)
0336 { T t(v); --v; return t; }
0337 };
0338
0339
0340
0341
0342
0343
0344
0345
0346
0347
0348
0349
0350
0351
0352
0353
0354 template <typename T>
0355 struct rank { static int const value = INT_MAX; };
0356
0357 template <> struct rank<void> { static int const value = 0; };
0358 template <> struct rank<bool> { static int const value = 10; };
0359
0360 template <> struct rank<char> { static int const value = 20; };
0361 template <> struct rank<signed char> { static int const value = 20; };
0362 template <> struct rank<unsigned char> { static int const value = 30; };
0363 #if !defined(BOOST_NO_INTRINSIC_WCHAR_T)
0364 template <> struct rank<wchar_t> { static int const value = 40; };
0365 #endif
0366
0367 template <> struct rank<short> { static int const value = 50; };
0368 template <> struct rank<unsigned short> { static int const value = 60; };
0369
0370 template <> struct rank<int> { static int const value = 70; };
0371 template <> struct rank<unsigned int> { static int const value = 80; };
0372
0373 template <> struct rank<long> { static int const value = 90; };
0374 template <> struct rank<unsigned long> { static int const value = 100; };
0375
0376 #ifdef BOOST_HAS_LONG_LONG
0377 template <> struct rank< ::boost::long_long_type> { static int const value = 110; };
0378 template <> struct rank< ::boost::ulong_long_type> { static int const value = 120; };
0379 #endif
0380
0381 template <> struct rank<float> { static int const value = 130; };
0382 template <> struct rank<double> { static int const value = 140; };
0383 template <> struct rank<long double> { static int const value = 150; };
0384
0385 template <typename T> struct rank<T*>
0386 { static int const value = 160; };
0387
0388 template <typename T> struct rank<T* const>
0389 { static int const value = 160; };
0390
0391 template <typename T, int N> struct rank<T[N]>
0392 { static int const value = 160; };
0393
0394
0395
0396
0397
0398
0399
0400
0401 template <typename T0, typename T1>
0402 struct higher_rank {
0403 typedef typename boost::mpl::if_c<
0404 rank<T0>::value < rank<T1>::value,
0405 T1, T0>::type type;
0406 };
0407
0408
0409
0410
0411
0412
0413
0414
0415
0416
0417
0418
0419
0420
0421
0422
0423
0424
0425
0426
0427
0428
0429
0430
0431
0432
0433
0434
0435
0436
0437 template <typename TagT, typename T0, typename T1>
0438 struct binary_operator;
0439
0440
0441 template <typename T0, typename T1>
0442 struct binary_operator<assign_op, T0, T1> {
0443
0444 typedef T0& result_type;
0445 static result_type eval(T0& lhs, T1 const& rhs)
0446 { return lhs = rhs; }
0447 };
0448
0449
0450 template <typename T1>
0451 struct binary_operator<index_op, nil_t, T1> {
0452
0453
0454
0455 typedef nil_t result_type;
0456 };
0457
0458
0459 template <typename T0, typename T1>
0460 struct binary_operator<index_op, T0*, T1> {
0461
0462 typedef T0& result_type;
0463 static result_type eval(T0* ptr, T1 const& index)
0464 { return ptr[index]; }
0465 };
0466
0467
0468 template <typename T0, typename T1>
0469 struct binary_operator<index_op, T0* const, T1> {
0470
0471 typedef T0& result_type;
0472 static result_type eval(T0* const ptr, T1 const& index)
0473 { return ptr[index]; }
0474 };
0475
0476
0477 template <typename T0, int N, typename T1>
0478 struct binary_operator<index_op, T0[N], T1> {
0479
0480 typedef T0& result_type;
0481 static result_type eval(T0* ptr, T1 const& index)
0482 { return ptr[index]; }
0483 };
0484
0485
0486 template <typename T0, typename T1>
0487 struct binary_operator<plus_assign_op, T0, T1> {
0488
0489 typedef T0& result_type;
0490 static result_type eval(T0& lhs, T1 const& rhs)
0491 { return lhs += rhs; }
0492 };
0493
0494
0495 template <typename T0, typename T1>
0496 struct binary_operator<minus_assign_op, T0, T1> {
0497
0498 typedef T0& result_type;
0499 static result_type eval(T0& lhs, T1 const& rhs)
0500 { return lhs -= rhs; }
0501 };
0502
0503
0504 template <typename T0, typename T1>
0505 struct binary_operator<times_assign_op, T0, T1> {
0506
0507 typedef T0& result_type;
0508 static result_type eval(T0& lhs, T1 const& rhs)
0509 { return lhs *= rhs; }
0510 };
0511
0512
0513 template <typename T0, typename T1>
0514 struct binary_operator<divide_assign_op, T0, T1> {
0515
0516 typedef T0& result_type;
0517 static result_type eval(T0& lhs, T1 const& rhs)
0518 { return lhs /= rhs; }
0519 };
0520
0521
0522 template <typename T0, typename T1>
0523 struct binary_operator<mod_assign_op, T0, T1> {
0524
0525 typedef T0& result_type;
0526 static result_type eval(T0& lhs, T1 const& rhs)
0527 { return lhs %= rhs; }
0528 };
0529
0530
0531 template <typename T0, typename T1>
0532 struct binary_operator<and_assign_op, T0, T1> {
0533
0534 typedef T0& result_type;
0535 static result_type eval(T0& lhs, T1 const& rhs)
0536 { return lhs &= rhs; }
0537 };
0538
0539
0540 template <typename T0, typename T1>
0541 struct binary_operator<or_assign_op, T0, T1> {
0542
0543 typedef T0& result_type;
0544 static result_type eval(T0& lhs, T1 const& rhs)
0545 { return lhs |= rhs; }
0546 };
0547
0548
0549 template <typename T0, typename T1>
0550 struct binary_operator<xor_assign_op, T0, T1> {
0551
0552 typedef T0& result_type;
0553 static result_type eval(T0& lhs, T1 const& rhs)
0554 { return lhs ^= rhs; }
0555 };
0556
0557
0558 template <typename T0, typename T1>
0559 struct binary_operator<shift_l_assign_op, T0, T1> {
0560
0561 typedef T0& result_type;
0562 static result_type eval(T0& lhs, T1 const& rhs)
0563 { return lhs <<= rhs; }
0564 };
0565
0566
0567 template <typename T0, typename T1>
0568 struct binary_operator<shift_r_assign_op, T0, T1> {
0569
0570 typedef T0& result_type;
0571 static result_type eval(T0& lhs, T1 const& rhs)
0572 { return lhs >>= rhs; }
0573 };
0574
0575
0576 template <typename T0, typename T1>
0577 struct binary_operator<plus_op, T0, T1> {
0578
0579 typedef typename higher_rank<T0, T1>::type const result_type;
0580 static result_type eval(T0 const& lhs, T1 const& rhs)
0581 { return lhs + rhs; }
0582 };
0583
0584
0585 template <typename T0, typename T1>
0586 struct binary_operator<minus_op, T0, T1> {
0587
0588 typedef typename higher_rank<T0, T1>::type const result_type;
0589 static result_type eval(T0 const& lhs, T1 const& rhs)
0590 { return lhs - rhs; }
0591 };
0592
0593
0594 template <typename T0, typename T1>
0595 struct binary_operator<times_op, T0, T1> {
0596
0597 typedef typename higher_rank<T0, T1>::type const result_type;
0598 static result_type eval(T0 const& lhs, T1 const& rhs)
0599 { return lhs * rhs; }
0600 };
0601
0602
0603 template <typename T0, typename T1>
0604 struct binary_operator<divide_op, T0, T1> {
0605
0606 typedef typename higher_rank<T0, T1>::type const result_type;
0607 static result_type eval(T0 const& lhs, T1 const& rhs)
0608 { return lhs / rhs; }
0609 };
0610
0611
0612 template <typename T0, typename T1>
0613 struct binary_operator<mod_op, T0, T1> {
0614
0615 typedef typename higher_rank<T0, T1>::type const result_type;
0616 static result_type eval(T0 const& lhs, T1 const& rhs)
0617 { return lhs % rhs; }
0618 };
0619
0620
0621 template <typename T0, typename T1>
0622 struct binary_operator<and_op, T0, T1> {
0623
0624 typedef typename higher_rank<T0, T1>::type const result_type;
0625 static result_type eval(T0 const& lhs, T1 const& rhs)
0626 { return lhs & rhs; }
0627 };
0628
0629
0630 template <typename T0, typename T1>
0631 struct binary_operator<or_op, T0, T1> {
0632
0633 typedef typename higher_rank<T0, T1>::type const result_type;
0634 static result_type eval(T0 const& lhs, T1 const& rhs)
0635 { return lhs | rhs; }
0636 };
0637
0638
0639 template <typename T0, typename T1>
0640 struct binary_operator<xor_op, T0, T1> {
0641
0642 typedef typename higher_rank<T0, T1>::type const result_type;
0643 static result_type eval(T0 const& lhs, T1 const& rhs)
0644 { return lhs ^ rhs; }
0645 };
0646
0647
0648 template <typename T0, typename T1>
0649 struct binary_operator<shift_l_op, T0, T1> {
0650
0651 typedef T0 const result_type;
0652 static result_type eval(T0 const& lhs, T1 const& rhs)
0653 { return lhs << rhs; }
0654 };
0655
0656
0657 template <typename T0, typename T1>
0658 struct binary_operator<shift_r_op, T0, T1> {
0659
0660 typedef T0 const result_type;
0661 static result_type eval(T0 const& lhs, T1 const& rhs)
0662 { return lhs >> rhs; }
0663 };
0664
0665
0666 template <typename T0, typename T1>
0667 struct binary_operator<eq_op, T0, T1> {
0668
0669 typedef bool result_type;
0670 static result_type eval(T0 const& lhs, T1 const& rhs)
0671 { return lhs == rhs; }
0672 };
0673
0674
0675 template <typename T0, typename T1>
0676 struct binary_operator<not_eq_op, T0, T1> {
0677
0678 typedef bool result_type;
0679 static result_type eval(T0 const& lhs, T1 const& rhs)
0680 { return lhs != rhs; }
0681 };
0682
0683
0684 template <typename T0, typename T1>
0685 struct binary_operator<lt_op, T0, T1> {
0686
0687 typedef bool result_type;
0688 static result_type eval(T0 const& lhs, T1 const& rhs)
0689 { return lhs < rhs; }
0690 };
0691
0692
0693 template <typename T0, typename T1>
0694 struct binary_operator<lt_eq_op, T0, T1> {
0695
0696 typedef bool result_type;
0697 static result_type eval(T0 const& lhs, T1 const& rhs)
0698 { return lhs <= rhs; }
0699 };
0700
0701
0702 template <typename T0, typename T1>
0703 struct binary_operator<gt_op, T0, T1> {
0704
0705 typedef bool result_type;
0706 static result_type eval(T0 const& lhs, T1 const& rhs)
0707 { return lhs > rhs; }
0708 };
0709
0710
0711 template <typename T0, typename T1>
0712 struct binary_operator<gt_eq_op, T0, T1> {
0713
0714 typedef bool result_type;
0715 static result_type eval(T0 const& lhs, T1 const& rhs)
0716 { return lhs >= rhs; }
0717 };
0718
0719
0720 template <typename T0, typename T1>
0721 struct binary_operator<logical_and_op, T0, T1> {
0722
0723 typedef bool result_type;
0724
0725 };
0726
0727
0728 template <typename T0, typename T1>
0729 struct binary_operator<logical_or_op, T0, T1> {
0730
0731 typedef bool result_type;
0732
0733 };
0734
0735
0736
0737
0738
0739
0740 struct negative_op {
0741
0742 template <typename T0>
0743 struct result {
0744
0745 typedef typename unary_operator<negative_op, T0>::result_type type;
0746 };
0747
0748 template <typename T0>
0749 typename unary_operator<negative_op, T0>::result_type
0750 operator()(T0& _0) const
0751 { return unary_operator<negative_op, T0>::eval(_0); }
0752 };
0753
0754
0755 template <typename BaseT>
0756 inline typename impl::make_unary<negative_op, BaseT>::type
0757 operator-(actor<BaseT> const& _0)
0758 {
0759 return impl::make_unary<negative_op, BaseT>::construct(_0);
0760 }
0761
0762
0763
0764
0765
0766
0767 struct positive_op {
0768
0769 template <typename T0>
0770 struct result {
0771
0772 typedef typename unary_operator<positive_op, T0>::result_type type;
0773 };
0774
0775 template <typename T0>
0776 typename unary_operator<positive_op, T0>::result_type
0777 operator()(T0& _0) const
0778 { return unary_operator<positive_op, T0>::eval(_0); }
0779 };
0780
0781
0782 template <typename BaseT>
0783 inline typename impl::make_unary<positive_op, BaseT>::type
0784 operator+(actor<BaseT> const& _0)
0785 {
0786 return impl::make_unary<positive_op, BaseT>::construct(_0);
0787 }
0788
0789
0790
0791
0792
0793
0794 struct logical_not_op {
0795
0796 template <typename T0>
0797 struct result {
0798
0799 typedef typename unary_operator<logical_not_op, T0>::result_type type;
0800 };
0801
0802 template <typename T0>
0803 typename unary_operator<logical_not_op, T0>::result_type
0804 operator()(T0& _0) const
0805 { return unary_operator<logical_not_op, T0>::eval(_0); }
0806 };
0807
0808
0809 template <typename BaseT>
0810 inline typename impl::make_unary<logical_not_op, BaseT>::type
0811 operator!(actor<BaseT> const& _0)
0812 {
0813 return impl::make_unary<logical_not_op, BaseT>::construct(_0);
0814 }
0815
0816
0817
0818
0819
0820
0821 struct invert_op {
0822
0823 template <typename T0>
0824 struct result {
0825
0826 typedef typename unary_operator<invert_op, T0>::result_type type;
0827 };
0828
0829 template <typename T0>
0830 typename unary_operator<invert_op, T0>::result_type
0831 operator()(T0& _0) const
0832 { return unary_operator<invert_op, T0>::eval(_0); }
0833 };
0834
0835
0836 template <typename BaseT>
0837 inline typename impl::make_unary<invert_op, BaseT>::type
0838 operator~(actor<BaseT> const& _0)
0839 {
0840 return impl::make_unary<invert_op, BaseT>::construct(_0);
0841 }
0842
0843
0844
0845
0846
0847
0848 struct reference_op {
0849
0850 template <typename T0>
0851 struct result {
0852
0853 typedef typename unary_operator<reference_op, T0>::result_type type;
0854 };
0855
0856 template <typename T0>
0857 typename unary_operator<reference_op, T0>::result_type
0858 operator()(T0& _0) const
0859 { return unary_operator<reference_op, T0>::eval(_0); }
0860 };
0861
0862
0863 template <typename BaseT>
0864 inline typename impl::make_unary<reference_op, BaseT>::type
0865 operator&(actor<BaseT> const& _0)
0866 {
0867 return impl::make_unary<reference_op, BaseT>::construct(_0);
0868 }
0869
0870
0871
0872
0873
0874
0875 struct dereference_op {
0876
0877 template <typename T0>
0878 struct result {
0879
0880 typedef typename unary_operator<dereference_op, T0>::result_type type;
0881 };
0882
0883 template <typename T0>
0884 typename unary_operator<dereference_op, T0>::result_type
0885 operator()(T0& _0) const
0886 { return unary_operator<dereference_op, T0>::eval(_0); }
0887 };
0888
0889
0890 template <typename BaseT>
0891 inline typename impl::make_unary<dereference_op, BaseT>::type
0892 operator*(actor<BaseT> const& _0)
0893 {
0894 return impl::make_unary<dereference_op, BaseT>::construct(_0);
0895 }
0896
0897
0898
0899
0900
0901
0902 struct pre_incr_op {
0903
0904 template <typename T0>
0905 struct result {
0906
0907 typedef typename unary_operator<pre_incr_op, T0>::result_type type;
0908 };
0909
0910 template <typename T0>
0911 typename unary_operator<pre_incr_op, T0>::result_type
0912 operator()(T0& _0) const
0913 { return unary_operator<pre_incr_op, T0>::eval(_0); }
0914 };
0915
0916
0917 template <typename BaseT>
0918 inline typename impl::make_unary<pre_incr_op, BaseT>::type
0919 operator++(actor<BaseT> const& _0)
0920 {
0921 return impl::make_unary<pre_incr_op, BaseT>::construct(_0);
0922 }
0923
0924
0925
0926
0927
0928
0929 struct pre_decr_op {
0930
0931 template <typename T0>
0932 struct result {
0933
0934 typedef typename unary_operator<pre_decr_op, T0>::result_type type;
0935 };
0936
0937 template <typename T0>
0938 typename unary_operator<pre_decr_op, T0>::result_type
0939 operator()(T0& _0) const
0940 { return unary_operator<pre_decr_op, T0>::eval(_0); }
0941 };
0942
0943
0944 template <typename BaseT>
0945 inline typename impl::make_unary<pre_decr_op, BaseT>::type
0946 operator--(actor<BaseT> const& _0)
0947 {
0948 return impl::make_unary<pre_decr_op, BaseT>::construct(_0);
0949 }
0950
0951
0952
0953
0954
0955
0956 struct post_incr_op {
0957
0958 template <typename T0>
0959 struct result {
0960
0961 typedef typename unary_operator<post_incr_op, T0>::result_type type;
0962 };
0963
0964 template <typename T0>
0965 typename unary_operator<post_incr_op, T0>::result_type
0966 operator()(T0& _0) const
0967 { return unary_operator<post_incr_op, T0>::eval(_0); }
0968 };
0969
0970
0971 template <typename BaseT>
0972 inline typename impl::make_unary<post_incr_op, BaseT>::type
0973 operator++(actor<BaseT> const& _0, int)
0974 {
0975 return impl::make_unary<post_incr_op, BaseT>::construct(_0);
0976 }
0977
0978
0979
0980
0981
0982
0983 struct post_decr_op {
0984
0985 template <typename T0>
0986 struct result {
0987
0988 typedef typename unary_operator<post_decr_op, T0>::result_type type;
0989 };
0990
0991 template <typename T0>
0992 typename unary_operator<post_decr_op, T0>::result_type
0993 operator()(T0& _0) const
0994 { return unary_operator<post_decr_op, T0>::eval(_0); }
0995 };
0996
0997
0998 template <typename BaseT>
0999 inline typename impl::make_unary<post_decr_op, BaseT>::type
1000 operator--(actor<BaseT> const& _0, int)
1001 {
1002 return impl::make_unary<post_decr_op, BaseT>::construct(_0);
1003 }
1004
1005
1006
1007
1008
1009
1010
1011 struct assign_op {
1012
1013 template <typename T0, typename T1>
1014 struct result {
1015
1016 typedef typename binary_operator<assign_op, T0, T1>
1017 ::result_type type;
1018 };
1019
1020 template <typename T0, typename T1>
1021 typename binary_operator<assign_op, T0, T1>::result_type
1022 operator()(T0& _0, T1& _1) const
1023 { return binary_operator<assign_op, T0, T1>::eval(_0, _1); }
1024 };
1025
1026
1027 template <typename BaseT>
1028 template <typename B>
1029 inline typename impl::make_binary1<assign_op, BaseT, B>::type
1030 actor<BaseT>::operator=(B const& _1) const
1031 {
1032 return impl::make_binary1<assign_op, BaseT, B>::construct(*this, _1);
1033 }
1034
1035
1036
1037
1038
1039
1040
1041 struct index_op {
1042
1043 template <typename T0, typename T1>
1044 struct result {
1045
1046 typedef typename binary_operator<index_op, T0, T1>
1047 ::result_type type;
1048 };
1049
1050 template <typename T0, typename T1>
1051 typename binary_operator<index_op, T0, T1>::result_type
1052 operator()(T0& _0, T1& _1) const
1053 { return binary_operator<index_op, T0, T1>::eval(_0, _1); }
1054 };
1055
1056
1057 template <typename BaseT>
1058 template <typename B>
1059 inline typename impl::make_binary1<index_op, BaseT, B>::type
1060 actor<BaseT>::operator[](B const& _1) const
1061 {
1062 return impl::make_binary1<index_op, BaseT, B>::construct(*this, _1);
1063 }
1064
1065
1066
1067
1068
1069
1070 struct plus_assign_op {
1071
1072 template <typename T0, typename T1>
1073 struct result {
1074
1075 typedef typename binary_operator<plus_assign_op, T0, T1>
1076 ::result_type type;
1077 };
1078
1079 template <typename T0, typename T1>
1080 typename binary_operator<plus_assign_op, T0, T1>::result_type
1081 operator()(T0& _0, T1& _1) const
1082 { return binary_operator<plus_assign_op, T0, T1>::eval(_0, _1); }
1083 };
1084
1085
1086 template <typename BaseT, typename T1>
1087 inline typename impl::make_binary1<plus_assign_op, BaseT, T1>::type
1088 operator+=(actor<BaseT> const& _0, T1 CREF _1)
1089 {
1090 return impl::make_binary1<plus_assign_op, BaseT, T1>::construct(_0, _1);
1091 }
1092
1093
1094
1095
1096
1097
1098 struct minus_assign_op {
1099
1100 template <typename T0, typename T1>
1101 struct result {
1102
1103 typedef typename binary_operator<minus_assign_op, T0, T1>
1104 ::result_type type;
1105 };
1106
1107 template <typename T0, typename T1>
1108 typename binary_operator<minus_assign_op, T0, T1>::result_type
1109 operator()(T0& _0, T1& _1) const
1110 { return binary_operator<minus_assign_op, T0, T1>::eval(_0, _1); }
1111 };
1112
1113
1114 template <typename BaseT, typename T1>
1115 inline typename impl::make_binary1<minus_assign_op, BaseT, T1>::type
1116 operator-=(actor<BaseT> const& _0, T1 CREF _1)
1117 {
1118 return impl::make_binary1<minus_assign_op, BaseT, T1>::construct(_0, _1);
1119 }
1120
1121
1122
1123
1124
1125
1126 struct times_assign_op {
1127
1128 template <typename T0, typename T1>
1129 struct result {
1130
1131 typedef typename binary_operator<times_assign_op, T0, T1>
1132 ::result_type type;
1133 };
1134
1135 template <typename T0, typename T1>
1136 typename binary_operator<times_assign_op, T0, T1>::result_type
1137 operator()(T0& _0, T1& _1) const
1138 { return binary_operator<times_assign_op, T0, T1>::eval(_0, _1); }
1139 };
1140
1141
1142 template <typename BaseT, typename T1>
1143 inline typename impl::make_binary1<times_assign_op, BaseT, T1>::type
1144 operator*=(actor<BaseT> const& _0, T1 CREF _1)
1145 {
1146 return impl::make_binary1<times_assign_op, BaseT, T1>::construct(_0, _1);
1147 }
1148
1149
1150
1151
1152
1153
1154 struct divide_assign_op {
1155
1156 template <typename T0, typename T1>
1157 struct result {
1158
1159 typedef typename binary_operator<divide_assign_op, T0, T1>
1160 ::result_type type;
1161 };
1162
1163 template <typename T0, typename T1>
1164 typename binary_operator<divide_assign_op, T0, T1>::result_type
1165 operator()(T0& _0, T1& _1) const
1166 { return binary_operator<divide_assign_op, T0, T1>::eval(_0, _1); }
1167 };
1168
1169
1170 template <typename BaseT, typename T1>
1171 inline typename impl::make_binary1<divide_assign_op, BaseT, T1>::type
1172 operator/=(actor<BaseT> const& _0, T1 CREF _1)
1173 {
1174 return impl::make_binary1<divide_assign_op, BaseT, T1>::construct(_0, _1);
1175 }
1176
1177
1178
1179
1180
1181
1182 struct mod_assign_op {
1183
1184 template <typename T0, typename T1>
1185 struct result {
1186
1187 typedef typename binary_operator<mod_assign_op, T0, T1>
1188 ::result_type type;
1189 };
1190
1191 template <typename T0, typename T1>
1192 typename binary_operator<mod_assign_op, T0, T1>::result_type
1193 operator()(T0& _0, T1& _1) const
1194 { return binary_operator<mod_assign_op, T0, T1>::eval(_0, _1); }
1195 };
1196
1197
1198 template <typename BaseT, typename T1>
1199 inline typename impl::make_binary1<mod_assign_op, BaseT, T1>::type
1200 operator%=(actor<BaseT> const& _0, T1 CREF _1)
1201 {
1202 return impl::make_binary1<mod_assign_op, BaseT, T1>::construct(_0, _1);
1203 }
1204
1205
1206
1207
1208
1209
1210 struct and_assign_op {
1211
1212 template <typename T0, typename T1>
1213 struct result {
1214
1215 typedef typename binary_operator<and_assign_op, T0, T1>
1216 ::result_type type;
1217 };
1218
1219 template <typename T0, typename T1>
1220 typename binary_operator<and_assign_op, T0, T1>::result_type
1221 operator()(T0& _0, T1& _1) const
1222 { return binary_operator<and_assign_op, T0, T1>::eval(_0, _1); }
1223 };
1224
1225
1226 template <typename BaseT, typename T1>
1227 inline typename impl::make_binary1<and_assign_op, BaseT, T1>::type
1228 operator&=(actor<BaseT> const& _0, T1 CREF _1)
1229 {
1230 return impl::make_binary1<and_assign_op, BaseT, T1>::construct(_0, _1);
1231 }
1232
1233
1234
1235
1236
1237
1238 struct or_assign_op {
1239
1240 template <typename T0, typename T1>
1241 struct result {
1242
1243 typedef typename binary_operator<or_assign_op, T0, T1>
1244 ::result_type type;
1245 };
1246
1247 template <typename T0, typename T1>
1248 typename binary_operator<or_assign_op, T0, T1>::result_type
1249 operator()(T0& _0, T1& _1) const
1250 { return binary_operator<or_assign_op, T0, T1>::eval(_0, _1); }
1251 };
1252
1253
1254 template <typename BaseT, typename T1>
1255 inline typename impl::make_binary1<or_assign_op, BaseT, T1>::type
1256 operator|=(actor<BaseT> const& _0, T1 CREF _1)
1257 {
1258 return impl::make_binary1<or_assign_op, BaseT, T1>::construct(_0, _1);
1259 }
1260
1261
1262
1263
1264
1265
1266 struct xor_assign_op {
1267
1268 template <typename T0, typename T1>
1269 struct result {
1270
1271 typedef typename binary_operator<xor_assign_op, T0, T1>
1272 ::result_type type;
1273 };
1274
1275 template <typename T0, typename T1>
1276 typename binary_operator<xor_assign_op, T0, T1>::result_type
1277 operator()(T0& _0, T1& _1) const
1278 { return binary_operator<xor_assign_op, T0, T1>::eval(_0, _1); }
1279 };
1280
1281
1282 template <typename BaseT, typename T1>
1283 inline typename impl::make_binary1<xor_assign_op, BaseT, T1>::type
1284 operator^=(actor<BaseT> const& _0, T1 CREF _1)
1285 {
1286 return impl::make_binary1<xor_assign_op, BaseT, T1>::construct(_0, _1);
1287 }
1288
1289
1290
1291
1292
1293
1294 struct shift_l_assign_op {
1295
1296 template <typename T0, typename T1>
1297 struct result {
1298
1299 typedef typename binary_operator<shift_l_assign_op, T0, T1>
1300 ::result_type type;
1301 };
1302
1303 template <typename T0, typename T1>
1304 typename binary_operator<shift_l_assign_op, T0, T1>::result_type
1305 operator()(T0& _0, T1& _1) const
1306 { return binary_operator<shift_l_assign_op, T0, T1>::eval(_0, _1); }
1307 };
1308
1309
1310 template <typename BaseT, typename T1>
1311 inline typename impl::make_binary1<shift_l_assign_op, BaseT, T1>::type
1312 operator<<=(actor<BaseT> const& _0, T1 CREF _1)
1313 {
1314 return impl::make_binary1<shift_l_assign_op, BaseT, T1>::construct(_0, _1);
1315 }
1316
1317
1318
1319
1320
1321
1322 struct shift_r_assign_op {
1323
1324 template <typename T0, typename T1>
1325 struct result {
1326
1327 typedef typename binary_operator<shift_r_assign_op, T0, T1>
1328 ::result_type type;
1329 };
1330
1331 template <typename T0, typename T1>
1332 typename binary_operator<shift_r_assign_op, T0, T1>::result_type
1333 operator()(T0& _0, T1& _1) const
1334 { return binary_operator<shift_r_assign_op, T0, T1>::eval(_0, _1); }
1335 };
1336
1337
1338 template <typename BaseT, typename T1>
1339 inline typename impl::make_binary1<shift_r_assign_op, BaseT, T1>::type
1340 operator>>=(actor<BaseT> const& _0, T1 CREF _1)
1341 {
1342 return impl::make_binary1<shift_r_assign_op, BaseT, T1>::construct(_0, _1);
1343 }
1344
1345
1346
1347
1348
1349
1350 struct plus_op {
1351
1352 template <typename T0, typename T1>
1353 struct result {
1354
1355 typedef typename binary_operator<plus_op, T0, T1>
1356 ::result_type type;
1357 };
1358
1359 template <typename T0, typename T1>
1360 typename binary_operator<plus_op, T0, T1>::result_type
1361 operator()(T0& _0, T1& _1) const
1362 { return binary_operator<plus_op, T0, T1>::eval(_0, _1); }
1363 };
1364
1365
1366 template <typename BaseT, typename T1>
1367 inline typename impl::make_binary1<plus_op, BaseT, T1>::type
1368 operator+(actor<BaseT> const& _0, T1 CREF _1)
1369 {
1370 return impl::make_binary1<plus_op, BaseT, T1>::construct(_0, _1);
1371 }
1372
1373
1374 template <typename T0, typename BaseT>
1375 inline typename impl::make_binary2<plus_op, T0, BaseT>::type
1376 operator+(T0 CREF _0, actor<BaseT> const& _1)
1377 {
1378 return impl::make_binary2<plus_op, T0, BaseT>::construct(_0, _1);
1379 }
1380
1381
1382 template <typename BaseT0, typename BaseT1>
1383 inline typename impl::make_binary3<plus_op, BaseT0, BaseT1>::type
1384 operator+(actor<BaseT0> const& _0, actor<BaseT1> const& _1)
1385 {
1386 return impl::make_binary3<plus_op, BaseT0, BaseT1>::construct(_0, _1);
1387 }
1388
1389
1390
1391
1392
1393
1394 struct minus_op {
1395
1396 template <typename T0, typename T1>
1397 struct result {
1398
1399 typedef typename binary_operator<minus_op, T0, T1>
1400 ::result_type type;
1401 };
1402
1403 template <typename T0, typename T1>
1404 typename binary_operator<minus_op, T0, T1>::result_type
1405 operator()(T0& _0, T1& _1) const
1406 { return binary_operator<minus_op, T0, T1>::eval(_0, _1); }
1407 };
1408
1409
1410 template <typename BaseT, typename T1>
1411 inline typename impl::make_binary1<minus_op, BaseT, T1>::type
1412 operator-(actor<BaseT> const& _0, T1 CREF _1)
1413 {
1414 return impl::make_binary1<minus_op, BaseT, T1>::construct(_0, _1);
1415 }
1416
1417
1418 template <typename T0, typename BaseT>
1419 inline typename impl::make_binary2<minus_op, T0, BaseT>::type
1420 operator-(T0 CREF _0, actor<BaseT> const& _1)
1421 {
1422 return impl::make_binary2<minus_op, T0, BaseT>::construct(_0, _1);
1423 }
1424
1425
1426 template <typename BaseT0, typename BaseT1>
1427 inline typename impl::make_binary3<minus_op, BaseT0, BaseT1>::type
1428 operator-(actor<BaseT0> const& _0, actor<BaseT1> const& _1)
1429 {
1430 return impl::make_binary3<minus_op, BaseT0, BaseT1>::construct(_0, _1);
1431 }
1432
1433
1434
1435
1436
1437
1438 struct times_op {
1439
1440 template <typename T0, typename T1>
1441 struct result {
1442
1443 typedef typename binary_operator<times_op, T0, T1>
1444 ::result_type type;
1445 };
1446
1447 template <typename T0, typename T1>
1448 typename binary_operator<times_op, T0, T1>::result_type
1449 operator()(T0& _0, T1& _1) const
1450 { return binary_operator<times_op, T0, T1>::eval(_0, _1); }
1451 };
1452
1453
1454 template <typename BaseT, typename T1>
1455 inline typename impl::make_binary1<times_op, BaseT, T1>::type
1456 operator*(actor<BaseT> const& _0, T1 CREF _1)
1457 {
1458 return impl::make_binary1<times_op, BaseT, T1>::construct(_0, _1);
1459 }
1460
1461
1462 template <typename T0, typename BaseT>
1463 inline typename impl::make_binary2<times_op, T0, BaseT>::type
1464 operator*(T0 CREF _0, actor<BaseT> const& _1)
1465 {
1466 return impl::make_binary2<times_op, T0, BaseT>::construct(_0, _1);
1467 }
1468
1469
1470 template <typename BaseT0, typename BaseT1>
1471 inline typename impl::make_binary3<times_op, BaseT0, BaseT1>::type
1472 operator*(actor<BaseT0> const& _0, actor<BaseT1> const& _1)
1473 {
1474 return impl::make_binary3<times_op, BaseT0, BaseT1>::construct(_0, _1);
1475 }
1476
1477
1478
1479
1480
1481
1482 struct divide_op {
1483
1484 template <typename T0, typename T1>
1485 struct result {
1486
1487 typedef typename binary_operator<divide_op, T0, T1>
1488 ::result_type type;
1489 };
1490
1491 template <typename T0, typename T1>
1492 typename binary_operator<divide_op, T0, T1>::result_type
1493 operator()(T0& _0, T1& _1) const
1494 { return binary_operator<divide_op, T0, T1>::eval(_0, _1); }
1495 };
1496
1497
1498 template <typename BaseT, typename T1>
1499 inline typename impl::make_binary1<divide_op, BaseT, T1>::type
1500 operator/(actor<BaseT> const& _0, T1 CREF _1)
1501 {
1502 return impl::make_binary1<divide_op, BaseT, T1>::construct(_0, _1);
1503 }
1504
1505
1506 template <typename T0, typename BaseT>
1507 inline typename impl::make_binary2<divide_op, T0, BaseT>::type
1508 operator/(T0 CREF _0, actor<BaseT> const& _1)
1509 {
1510 return impl::make_binary2<divide_op, T0, BaseT>::construct(_0, _1);
1511 }
1512
1513
1514 template <typename BaseT0, typename BaseT1>
1515 inline typename impl::make_binary3<divide_op, BaseT0, BaseT1>::type
1516 operator/(actor<BaseT0> const& _0, actor<BaseT1> const& _1)
1517 {
1518 return impl::make_binary3<divide_op, BaseT0, BaseT1>::construct(_0, _1);
1519 }
1520
1521
1522
1523
1524
1525
1526 struct mod_op {
1527
1528 template <typename T0, typename T1>
1529 struct result {
1530
1531 typedef typename binary_operator<mod_op, T0, T1>
1532 ::result_type type;
1533 };
1534
1535 template <typename T0, typename T1>
1536 typename binary_operator<mod_op, T0, T1>::result_type
1537 operator()(T0& _0, T1& _1) const
1538 { return binary_operator<mod_op, T0, T1>::eval(_0, _1); }
1539 };
1540
1541
1542 template <typename BaseT, typename T1>
1543 inline typename impl::make_binary1<mod_op, BaseT, T1>::type
1544 operator%(actor<BaseT> const& _0, T1 CREF _1)
1545 {
1546 return impl::make_binary1<mod_op, BaseT, T1>::construct(_0, _1);
1547 }
1548
1549
1550 template <typename T0, typename BaseT>
1551 inline typename impl::make_binary2<mod_op, T0, BaseT>::type
1552 operator%(T0 CREF _0, actor<BaseT> const& _1)
1553 {
1554 return impl::make_binary2<mod_op, T0, BaseT>::construct(_0, _1);
1555 }
1556
1557
1558 template <typename BaseT0, typename BaseT1>
1559 inline typename impl::make_binary3<mod_op, BaseT0, BaseT1>::type
1560 operator%(actor<BaseT0> const& _0, actor<BaseT1> const& _1)
1561 {
1562 return impl::make_binary3<mod_op, BaseT0, BaseT1>::construct(_0, _1);
1563 }
1564
1565
1566
1567
1568
1569
1570 struct and_op {
1571
1572 template <typename T0, typename T1>
1573 struct result {
1574
1575 typedef typename binary_operator<and_op, T0, T1>
1576 ::result_type type;
1577 };
1578
1579 template <typename T0, typename T1>
1580 typename binary_operator<and_op, T0, T1>::result_type
1581 operator()(T0& _0, T1& _1) const
1582 { return binary_operator<and_op, T0, T1>::eval(_0, _1); }
1583 };
1584
1585
1586 template <typename BaseT, typename T1>
1587 inline typename impl::make_binary1<and_op, BaseT, T1>::type
1588 operator&(actor<BaseT> const& _0, T1 CREF _1)
1589 {
1590 return impl::make_binary1<and_op, BaseT, T1>::construct(_0, _1);
1591 }
1592
1593
1594 template <typename T0, typename BaseT>
1595 inline typename impl::make_binary2<and_op, T0, BaseT>::type
1596 operator&(T0 CREF _0, actor<BaseT> const& _1)
1597 {
1598 return impl::make_binary2<and_op, T0, BaseT>::construct(_0, _1);
1599 }
1600
1601
1602 template <typename BaseT0, typename BaseT1>
1603 inline typename impl::make_binary3<and_op, BaseT0, BaseT1>::type
1604 operator&(actor<BaseT0> const& _0, actor<BaseT1> const& _1)
1605 {
1606 return impl::make_binary3<and_op, BaseT0, BaseT1>::construct(_0, _1);
1607 }
1608
1609
1610
1611
1612
1613
1614 struct or_op {
1615
1616 template <typename T0, typename T1>
1617 struct result {
1618
1619 typedef typename binary_operator<or_op, T0, T1>
1620 ::result_type type;
1621 };
1622
1623 template <typename T0, typename T1>
1624 typename binary_operator<or_op, T0, T1>::result_type
1625 operator()(T0& _0, T1& _1) const
1626 { return binary_operator<or_op, T0, T1>::eval(_0, _1); }
1627 };
1628
1629
1630 template <typename BaseT, typename T1>
1631 inline typename impl::make_binary1<or_op, BaseT, T1>::type
1632 operator|(actor<BaseT> const& _0, T1 CREF _1)
1633 {
1634 return impl::make_binary1<or_op, BaseT, T1>::construct(_0, _1);
1635 }
1636
1637
1638 template <typename T0, typename BaseT>
1639 inline typename impl::make_binary2<or_op, T0, BaseT>::type
1640 operator|(T0 CREF _0, actor<BaseT> const& _1)
1641 {
1642 return impl::make_binary2<or_op, T0, BaseT>::construct(_0, _1);
1643 }
1644
1645
1646 template <typename BaseT0, typename BaseT1>
1647 inline typename impl::make_binary3<or_op, BaseT0, BaseT1>::type
1648 operator|(actor<BaseT0> const& _0, actor<BaseT1> const& _1)
1649 {
1650 return impl::make_binary3<or_op, BaseT0, BaseT1>::construct(_0, _1);
1651 }
1652
1653
1654
1655
1656
1657
1658 struct xor_op {
1659
1660 template <typename T0, typename T1>
1661 struct result {
1662
1663 typedef typename binary_operator<xor_op, T0, T1>
1664 ::result_type type;
1665 };
1666
1667 template <typename T0, typename T1>
1668 typename binary_operator<xor_op, T0, T1>::result_type
1669 operator()(T0& _0, T1& _1) const
1670 { return binary_operator<xor_op, T0, T1>::eval(_0, _1); }
1671 };
1672
1673
1674 template <typename BaseT, typename T1>
1675 inline typename impl::make_binary1<xor_op, BaseT, T1>::type
1676 operator^(actor<BaseT> const& _0, T1 CREF _1)
1677 {
1678 return impl::make_binary1<xor_op, BaseT, T1>::construct(_0, _1);
1679 }
1680
1681
1682 template <typename T0, typename BaseT>
1683 inline typename impl::make_binary2<xor_op, T0, BaseT>::type
1684 operator^(T0 CREF _0, actor<BaseT> const& _1)
1685 {
1686 return impl::make_binary2<xor_op, T0, BaseT>::construct(_0, _1);
1687 }
1688
1689
1690 template <typename BaseT0, typename BaseT1>
1691 inline typename impl::make_binary3<xor_op, BaseT0, BaseT1>::type
1692 operator^(actor<BaseT0> const& _0, actor<BaseT1> const& _1)
1693 {
1694 return impl::make_binary3<xor_op, BaseT0, BaseT1>::construct(_0, _1);
1695 }
1696
1697
1698
1699
1700
1701
1702 struct shift_l_op {
1703
1704 template <typename T0, typename T1>
1705 struct result {
1706
1707 typedef typename binary_operator<shift_l_op, T0, T1>
1708 ::result_type type;
1709 };
1710
1711 template <typename T0, typename T1>
1712 typename binary_operator<shift_l_op, T0, T1>::result_type
1713 operator()(T0& _0, T1& _1) const
1714 { return binary_operator<shift_l_op, T0, T1>::eval(_0, _1); }
1715 };
1716
1717
1718 template <typename BaseT, typename T1>
1719 inline typename impl::make_binary1<shift_l_op, BaseT, T1>::type
1720 operator<<(actor<BaseT> const& _0, T1 CREF _1)
1721 {
1722 return impl::make_binary1<shift_l_op, BaseT, T1>::construct(_0, _1);
1723 }
1724
1725
1726 template <typename T0, typename BaseT>
1727 inline typename impl::make_binary2<shift_l_op, T0, BaseT>::type
1728 operator<<(T0 CREF _0, actor<BaseT> const& _1)
1729 {
1730 return impl::make_binary2<shift_l_op, T0, BaseT>::construct(_0, _1);
1731 }
1732
1733
1734 template <typename BaseT0, typename BaseT1>
1735 inline typename impl::make_binary3<shift_l_op, BaseT0, BaseT1>::type
1736 operator<<(actor<BaseT0> const& _0, actor<BaseT1> const& _1)
1737 {
1738 return impl::make_binary3<shift_l_op, BaseT0, BaseT1>::construct(_0, _1);
1739 }
1740
1741
1742
1743
1744
1745
1746 struct shift_r_op {
1747
1748 template <typename T0, typename T1>
1749 struct result {
1750
1751 typedef typename binary_operator<shift_r_op, T0, T1>
1752 ::result_type type;
1753 };
1754
1755 template <typename T0, typename T1>
1756 typename binary_operator<shift_r_op, T0, T1>::result_type
1757 operator()(T0& _0, T1& _1) const
1758 { return binary_operator<shift_r_op, T0, T1>::eval(_0, _1); }
1759 };
1760
1761
1762 template <typename BaseT, typename T1>
1763 inline typename impl::make_binary1<shift_r_op, BaseT, T1>::type
1764 operator>>(actor<BaseT> const& _0, T1 CREF _1)
1765 {
1766 return impl::make_binary1<shift_r_op, BaseT, T1>::construct(_0, _1);
1767 }
1768
1769
1770 template <typename T0, typename BaseT>
1771 inline typename impl::make_binary2<shift_r_op, T0, BaseT>::type
1772 operator>>(T0 CREF _0, actor<BaseT> const& _1)
1773 {
1774 return impl::make_binary2<shift_r_op, T0, BaseT>::construct(_0, _1);
1775 }
1776
1777
1778 template <typename BaseT0, typename BaseT1>
1779 inline typename impl::make_binary3<shift_r_op, BaseT0, BaseT1>::type
1780 operator>>(actor<BaseT0> const& _0, actor<BaseT1> const& _1)
1781 {
1782 return impl::make_binary3<shift_r_op, BaseT0, BaseT1>::construct(_0, _1);
1783 }
1784
1785
1786
1787
1788
1789
1790 struct eq_op {
1791
1792 template <typename T0, typename T1>
1793 struct result {
1794
1795 typedef typename binary_operator<eq_op, T0, T1>
1796 ::result_type type;
1797 };
1798
1799 template <typename T0, typename T1>
1800 typename binary_operator<eq_op, T0, T1>::result_type
1801 operator()(T0& _0, T1& _1) const
1802 { return binary_operator<eq_op, T0, T1>::eval(_0, _1); }
1803 };
1804
1805
1806 template <typename BaseT, typename T1>
1807 inline typename impl::make_binary1<eq_op, BaseT, T1>::type
1808 operator==(actor<BaseT> const& _0, T1 CREF _1)
1809 {
1810 return impl::make_binary1<eq_op, BaseT, T1>::construct(_0, _1);
1811 }
1812
1813
1814 template <typename T0, typename BaseT>
1815 inline typename impl::make_binary2<eq_op, T0, BaseT>::type
1816 operator==(T0 CREF _0, actor<BaseT> const& _1)
1817 {
1818 return impl::make_binary2<eq_op, T0, BaseT>::construct(_0, _1);
1819 }
1820
1821
1822 template <typename BaseT0, typename BaseT1>
1823 inline typename impl::make_binary3<eq_op, BaseT0, BaseT1>::type
1824 operator==(actor<BaseT0> const& _0, actor<BaseT1> const& _1)
1825 {
1826 return impl::make_binary3<eq_op, BaseT0, BaseT1>::construct(_0, _1);
1827 }
1828
1829
1830
1831
1832
1833
1834 struct not_eq_op {
1835
1836 template <typename T0, typename T1>
1837 struct result {
1838
1839 typedef typename binary_operator<not_eq_op, T0, T1>
1840 ::result_type type;
1841 };
1842
1843 template <typename T0, typename T1>
1844 typename binary_operator<not_eq_op, T0, T1>::result_type
1845 operator()(T0& _0, T1& _1) const
1846 { return binary_operator<not_eq_op, T0, T1>::eval(_0, _1); }
1847 };
1848
1849
1850 template <typename BaseT, typename T1>
1851 inline typename impl::make_binary1<not_eq_op, BaseT, T1>::type
1852 operator!=(actor<BaseT> const& _0, T1 CREF _1)
1853 {
1854 return impl::make_binary1<not_eq_op, BaseT, T1>::construct(_0, _1);
1855 }
1856
1857
1858 template <typename T0, typename BaseT>
1859 inline typename impl::make_binary2<not_eq_op, T0, BaseT>::type
1860 operator!=(T0 CREF _0, actor<BaseT> const& _1)
1861 {
1862 return impl::make_binary2<not_eq_op, T0, BaseT>::construct(_0, _1);
1863 }
1864
1865
1866 template <typename BaseT0, typename BaseT1>
1867 inline typename impl::make_binary3<not_eq_op, BaseT0, BaseT1>::type
1868 operator!=(actor<BaseT0> const& _0, actor<BaseT1> const& _1)
1869 {
1870 return impl::make_binary3<not_eq_op, BaseT0, BaseT1>::construct(_0, _1);
1871 }
1872
1873
1874
1875
1876
1877
1878 struct lt_op {
1879
1880 template <typename T0, typename T1>
1881 struct result {
1882
1883 typedef typename binary_operator<lt_op, T0, T1>
1884 ::result_type type;
1885 };
1886
1887 template <typename T0, typename T1>
1888 typename binary_operator<lt_op, T0, T1>::result_type
1889 operator()(T0& _0, T1& _1) const
1890 { return binary_operator<lt_op, T0, T1>::eval(_0, _1); }
1891 };
1892
1893
1894 template <typename BaseT, typename T1>
1895 inline typename impl::make_binary1<lt_op, BaseT, T1>::type
1896 operator<(actor<BaseT> const& _0, T1 CREF _1)
1897 {
1898 return impl::make_binary1<lt_op, BaseT, T1>::construct(_0, _1);
1899 }
1900
1901
1902 template <typename T0, typename BaseT>
1903 inline typename impl::make_binary2<lt_op, T0, BaseT>::type
1904 operator<(T0 CREF _0, actor<BaseT> const& _1)
1905 {
1906 return impl::make_binary2<lt_op, T0, BaseT>::construct(_0, _1);
1907 }
1908
1909
1910 template <typename BaseT0, typename BaseT1>
1911 inline typename impl::make_binary3<lt_op, BaseT0, BaseT1>::type
1912 operator<(actor<BaseT0> const& _0, actor<BaseT1> const& _1)
1913 {
1914 return impl::make_binary3<lt_op, BaseT0, BaseT1>::construct(_0, _1);
1915 }
1916
1917
1918
1919
1920
1921
1922 struct lt_eq_op {
1923
1924 template <typename T0, typename T1>
1925 struct result {
1926
1927 typedef typename binary_operator<lt_eq_op, T0, T1>
1928 ::result_type type;
1929 };
1930
1931 template <typename T0, typename T1>
1932 typename binary_operator<lt_eq_op, T0, T1>::result_type
1933 operator()(T0& _0, T1& _1) const
1934 { return binary_operator<lt_eq_op, T0, T1>::eval(_0, _1); }
1935 };
1936
1937
1938 template <typename BaseT, typename T1>
1939 inline typename impl::make_binary1<lt_eq_op, BaseT, T1>::type
1940 operator<=(actor<BaseT> const& _0, T1 CREF _1)
1941 {
1942 return impl::make_binary1<lt_eq_op, BaseT, T1>::construct(_0, _1);
1943 }
1944
1945
1946 template <typename T0, typename BaseT>
1947 inline typename impl::make_binary2<lt_eq_op, T0, BaseT>::type
1948 operator<=(T0 CREF _0, actor<BaseT> const& _1)
1949 {
1950 return impl::make_binary2<lt_eq_op, T0, BaseT>::construct(_0, _1);
1951 }
1952
1953
1954 template <typename BaseT0, typename BaseT1>
1955 inline typename impl::make_binary3<lt_eq_op, BaseT0, BaseT1>::type
1956 operator<=(actor<BaseT0> const& _0, actor<BaseT1> const& _1)
1957 {
1958 return impl::make_binary3<lt_eq_op, BaseT0, BaseT1>::construct(_0, _1);
1959 }
1960
1961
1962
1963
1964
1965
1966 struct gt_op {
1967
1968 template <typename T0, typename T1>
1969 struct result {
1970
1971 typedef typename binary_operator<gt_op, T0, T1>
1972 ::result_type type;
1973 };
1974
1975 template <typename T0, typename T1>
1976 typename binary_operator<gt_op, T0, T1>::result_type
1977 operator()(T0& _0, T1& _1) const
1978 { return binary_operator<gt_op, T0, T1>::eval(_0, _1); }
1979 };
1980
1981
1982 template <typename BaseT, typename T1>
1983 inline typename impl::make_binary1<gt_op, BaseT, T1>::type
1984 operator>(actor<BaseT> const& _0, T1 CREF _1)
1985 {
1986 return impl::make_binary1<gt_op, BaseT, T1>::construct(_0, _1);
1987 }
1988
1989
1990 template <typename T0, typename BaseT>
1991 inline typename impl::make_binary2<gt_op, T0, BaseT>::type
1992 operator>(T0 CREF _0, actor<BaseT> const& _1)
1993 {
1994 return impl::make_binary2<gt_op, T0, BaseT>::construct(_0, _1);
1995 }
1996
1997
1998 template <typename BaseT0, typename BaseT1>
1999 inline typename impl::make_binary3<gt_op, BaseT0, BaseT1>::type
2000 operator>(actor<BaseT0> const& _0, actor<BaseT1> const& _1)
2001 {
2002 return impl::make_binary3<gt_op, BaseT0, BaseT1>::construct(_0, _1);
2003 }
2004
2005
2006
2007
2008
2009
2010 struct gt_eq_op {
2011
2012 template <typename T0, typename T1>
2013 struct result {
2014
2015 typedef typename binary_operator<gt_eq_op, T0, T1>
2016 ::result_type type;
2017 };
2018
2019 template <typename T0, typename T1>
2020 typename binary_operator<gt_eq_op, T0, T1>::result_type
2021 operator()(T0& _0, T1& _1) const
2022 { return binary_operator<gt_eq_op, T0, T1>::eval(_0, _1); }
2023 };
2024
2025
2026 template <typename BaseT, typename T1>
2027 inline typename impl::make_binary1<gt_eq_op, BaseT, T1>::type
2028 operator>=(actor<BaseT> const& _0, T1 CREF _1)
2029 {
2030 return impl::make_binary1<gt_eq_op, BaseT, T1>::construct(_0, _1);
2031 }
2032
2033
2034 template <typename T0, typename BaseT>
2035 inline typename impl::make_binary2<gt_eq_op, T0, BaseT>::type
2036 operator>=(T0 CREF _0, actor<BaseT> const& _1)
2037 {
2038 return impl::make_binary2<gt_eq_op, T0, BaseT>::construct(_0, _1);
2039 }
2040
2041
2042 template <typename BaseT0, typename BaseT1>
2043 inline typename impl::make_binary3<gt_eq_op, BaseT0, BaseT1>::type
2044 operator>=(actor<BaseT0> const& _0, actor<BaseT1> const& _1)
2045 {
2046 return impl::make_binary3<gt_eq_op, BaseT0, BaseT1>::construct(_0, _1);
2047 }
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058 template <typename A0, typename A1>
2059 struct logical_and_composite {
2060
2061 typedef logical_and_composite<A0, A1> self_t;
2062
2063 template <typename TupleT>
2064 struct result {
2065
2066 typedef typename binary_operator<logical_and_op,
2067 typename actor_result<A0, TupleT>::plain_type,
2068 typename actor_result<A1, TupleT>::plain_type
2069 >::result_type type;
2070 };
2071
2072 logical_and_composite(A0 const& _0, A1 const& _1)
2073 : a0(_0), a1(_1) {}
2074
2075 template <typename TupleT>
2076 typename actor_result<self_t, TupleT>::type
2077 eval(TupleT const& args) const
2078 {
2079 return a0.eval(args) && a1.eval(args);
2080 }
2081
2082 A0 a0; A1 a1;
2083 };
2084
2085 #if !(defined(__ICL) && __ICL <= 500)
2086
2087 template <typename BaseT, typename T1>
2088 inline actor<logical_and_composite
2089 <actor<BaseT>, typename as_actor<T1>::type> >
2090 operator&&(actor<BaseT> const& _0, T1 CREF _1)
2091 {
2092 return logical_and_composite
2093 <actor<BaseT>, typename as_actor<T1>::type>
2094 (_0, as_actor<T1>::convert(_1));
2095 }
2096
2097
2098 template <typename T0, typename BaseT>
2099 inline actor<logical_and_composite
2100 <typename as_actor<T0>::type, actor<BaseT> > >
2101 operator&&(T0 CREF _0, actor<BaseT> const& _1)
2102 {
2103 return logical_and_composite
2104 <typename as_actor<T0>::type, actor<BaseT> >
2105 (as_actor<T0>::convert(_0), _1);
2106 }
2107
2108
2109 template <typename BaseT0, typename BaseT1>
2110 inline actor<logical_and_composite
2111 <actor<BaseT0>, actor<BaseT1> > >
2112 operator&&(actor<BaseT0> const& _0, actor<BaseT1> const& _1)
2113 {
2114 return logical_and_composite
2115 <actor<BaseT0>, actor<BaseT1> >
2116 (_0, _1);
2117 }
2118 #else
2119
2120 template <typename T0, typename T1>
2121 inline actor<logical_and_composite
2122 <typename as_actor<T0>::type, typename as_actor<T1>::type> >
2123 operator&&(T0 CREF _0, T1 CREF _1)
2124 {
2125 return logical_and_composite
2126 <typename as_actor<T0>::type, typename as_actor<T1>::type>
2127 (as_actor<T0>::convert(_0), as_actor<T1>::convert(_1));
2128 }
2129 #endif
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140 template <typename A0, typename A1>
2141 struct logical_or_composite {
2142
2143 typedef logical_or_composite<A0, A1> self_t;
2144
2145 template <typename TupleT>
2146 struct result {
2147
2148 typedef typename binary_operator<logical_or_op,
2149 typename actor_result<A0, TupleT>::plain_type,
2150 typename actor_result<A1, TupleT>::plain_type
2151 >::result_type type;
2152 };
2153
2154 logical_or_composite(A0 const& _0, A1 const& _1)
2155 : a0(_0), a1(_1) {}
2156
2157 template <typename TupleT>
2158 typename actor_result<self_t, TupleT>::type
2159 eval(TupleT const& args) const
2160 {
2161 return a0.eval(args) || a1.eval(args);
2162 }
2163
2164 A0 a0; A1 a1;
2165 };
2166
2167
2168 template <typename BaseT, typename T1>
2169 inline actor<logical_or_composite
2170 <actor<BaseT>, typename as_actor<T1>::type> >
2171 operator||(actor<BaseT> const& _0, T1 CREF _1)
2172 {
2173 return logical_or_composite
2174 <actor<BaseT>, typename as_actor<T1>::type>
2175 (_0, as_actor<T1>::convert(_1));
2176 }
2177
2178
2179 template <typename T0, typename BaseT>
2180 inline actor<logical_or_composite
2181 <typename as_actor<T0>::type, actor<BaseT> > >
2182 operator||(T0 CREF _0, actor<BaseT> const& _1)
2183 {
2184 return logical_or_composite
2185 <typename as_actor<T0>::type, actor<BaseT> >
2186 (as_actor<T0>::convert(_0), _1);
2187 }
2188
2189
2190 template <typename BaseT0, typename BaseT1>
2191 inline actor<logical_or_composite
2192 <actor<BaseT0>, actor<BaseT1> > >
2193 operator||(actor<BaseT0> const& _0, actor<BaseT1> const& _1)
2194 {
2195 return logical_or_composite
2196 <actor<BaseT0>, actor<BaseT1> >
2197 (_0, _1);
2198 }
2199
2200 }
2201
2202 #undef CREF
2203 #endif