00001 #ifndef BOOST_BIND_HPP_INCLUDED
00002 #define BOOST_BIND_HPP_INCLUDED
00003
00004
00005
00006 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
00007 # pragma once
00008 #endif
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #include <sysc/packages/boost/config.hpp>
00025 #include <sysc/packages/boost/ref.hpp>
00026 #include <sysc/packages/boost/mem_fn.hpp>
00027 #include <sysc/packages/boost/type.hpp>
00028 #include <sysc/packages/boost/bind/arg.hpp>
00029 #include <sysc/packages/boost/detail/workaround.hpp>
00030
00031
00032
00033 #if defined(__BORLANDC__)
00034 # define BOOST_BIND_VISIT_EACH boost::visit_each
00035 #else
00036 # define BOOST_BIND_VISIT_EACH visit_each
00037 #endif
00038
00039 #ifdef BOOST_MSVC
00040 # pragma warning(push)
00041 # pragma warning(disable: 4512) // assignment operator could not be generated
00042 #endif
00043
00044 namespace boost
00045 {
00046
00047 namespace _bi
00048 {
00049
00050
00051
00052 template<class R, class F> struct result_traits
00053 {
00054 typedef R type;
00055 };
00056
00057 #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
00058
00059 struct unspecified {};
00060
00061 template<class F> struct result_traits<unspecified, F>
00062 {
00063 typedef typename F::result_type type;
00064 };
00065
00066 template<class F> struct result_traits< unspecified, reference_wrapper<F> >
00067 {
00068 typedef typename F::result_type type;
00069 };
00070
00071 #endif
00072
00073
00074
00075 template<class T> bool ref_compare(T const & a, T const & b, long)
00076 {
00077 return a == b;
00078 }
00079
00080 template<class T> bool ref_compare(reference_wrapper<T> const & a, reference_wrapper<T> const & b, int)
00081 {
00082 return a.get_pointer() == b.get_pointer();
00083 }
00084
00085
00086
00087 template<class R, class F, class L> class bind_t;
00088
00089
00090
00091 template<class T> class value
00092 {
00093 public:
00094
00095 value(T const & t): t_(t) {}
00096
00097 T & get() { return t_; }
00098 T const & get() const { return t_; }
00099
00100 bool operator==(value const & rhs) const
00101 {
00102 return t_ == rhs.t_;
00103 }
00104
00105 private:
00106
00107 T t_;
00108 };
00109
00110
00111
00112 template<class T> class type {};
00113
00114
00115
00116 template<class F> inline F & unwrap(F * f, long)
00117 {
00118 return *f;
00119 }
00120
00121 template<class F> inline F & unwrap(reference_wrapper<F> * f, int)
00122 {
00123 return f->get();
00124 }
00125
00126 template<class F> inline F & unwrap(reference_wrapper<F> const * f, int)
00127 {
00128 return f->get();
00129 }
00130
00131 #if !( defined(__MWERKS__) && BOOST_WORKAROUND(__MWERKS__, <= 0x3004) )
00132
00133 template<class R, class T> inline _mfi::dm<R, T> unwrap(R T::* * pm, int)
00134 {
00135 return _mfi::dm<R, T>(*pm);
00136 }
00137
00138 #if !BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600))
00139
00140 template<class R, class T> inline _mfi::dm<R, T> unwrap(R T::* const * pm, int)
00141 {
00142 return _mfi::dm<R, T>(*pm);
00143 }
00144 #endif
00145
00146
00147 #endif
00148
00149
00150
00151 class list0
00152 {
00153 public:
00154
00155 list0() {}
00156
00157 template<class T> T & operator[] (_bi::value<T> & v) const { return v.get(); }
00158
00159 template<class T> T const & operator[] (_bi::value<T> const & v) const { return v.get(); }
00160
00161 template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
00162
00163 template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
00164
00165 template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
00166
00167 template<class R, class F, class A> R operator()(type<R>, F & f, A &, long)
00168 {
00169 return unwrap(&f, 0)();
00170 }
00171
00172 template<class R, class F, class A> R operator()(type<R>, F const & f, A &, long) const
00173 {
00174 return unwrap(&f, 0)();
00175 }
00176
00177 template<class F, class A> void operator()(type<void>, F & f, A &, int)
00178 {
00179 unwrap(&f, 0)();
00180 }
00181
00182 template<class F, class A> void operator()(type<void>, F const & f, A &, int) const
00183 {
00184 unwrap(&f, 0)();
00185 }
00186
00187 template<class V> void accept(V &) const
00188 {
00189 }
00190
00191 bool operator==(list0 const &) const
00192 {
00193 return true;
00194 }
00195 };
00196
00197 template<class A1> class list1
00198 {
00199 public:
00200
00201 explicit list1(A1 a1): a1_(a1) {}
00202
00203 A1 operator[] (boost::arg<1>) const { return a1_; }
00204
00205 A1 operator[] (boost::arg<1> (*) ()) const { return a1_; }
00206
00207 template<class T> T & operator[] ( _bi::value<T> & v ) const { return v.get(); }
00208
00209 template<class T> T const & operator[] ( _bi::value<T> const & v ) const { return v.get(); }
00210
00211 template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
00212
00213 template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
00214
00215 template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
00216
00217 template<class R, class F, class A> R operator()(type<R>, F & f, A & a, long)
00218 {
00219 return unwrap(&f, 0)(a[a1_]);
00220 }
00221
00222 template<class R, class F, class A> R operator()(type<R>, F const & f, A & a, long) const
00223 {
00224 return unwrap(&f, 0)(a[a1_]);
00225 }
00226
00227 template<class F, class A> void operator()(type<void>, F & f, A & a, int)
00228 {
00229 unwrap(&f, 0)(a[a1_]);
00230 }
00231
00232 template<class F, class A> void operator()(type<void>, F const & f, A & a, int) const
00233 {
00234 unwrap(&f, 0)(a[a1_]);
00235 }
00236
00237 template<class V> void accept(V & v) const
00238 {
00239 BOOST_BIND_VISIT_EACH(v, a1_, 0);
00240 }
00241
00242 bool operator==(list1 const & rhs) const
00243 {
00244 return ref_compare(a1_, rhs.a1_, 0);
00245 }
00246
00247 private:
00248
00249 A1 a1_;
00250 };
00251
00252 template<class A1, class A2> class list2
00253 {
00254 public:
00255
00256 list2(A1 a1, A2 a2): a1_(a1), a2_(a2) {}
00257
00258 A1 operator[] (boost::arg<1>) const { return a1_; }
00259 A2 operator[] (boost::arg<2>) const { return a2_; }
00260
00261 A1 operator[] (boost::arg<1> (*) ()) const { return a1_; }
00262 A2 operator[] (boost::arg<2> (*) ()) const { return a2_; }
00263
00264 template<class T> T & operator[] (_bi::value<T> & v) const { return v.get(); }
00265
00266 template<class T> T const & operator[] (_bi::value<T> const & v) const { return v.get(); }
00267
00268 template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
00269
00270 template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
00271
00272 template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
00273
00274 template<class R, class F, class A> R operator()(type<R>, F & f, A & a, long)
00275 {
00276 return unwrap(&f, 0)(a[a1_], a[a2_]);
00277 }
00278
00279 template<class R, class F, class A> R operator()(type<R>, F const & f, A & a, long) const
00280 {
00281 return unwrap(&f, 0)(a[a1_], a[a2_]);
00282 }
00283
00284 template<class F, class A> void operator()(type<void>, F & f, A & a, int)
00285 {
00286 unwrap(&f, 0)(a[a1_], a[a2_]);
00287 }
00288
00289 template<class F, class A> void operator()(type<void>, F const & f, A & a, int) const
00290 {
00291 unwrap(&f, 0)(a[a1_], a[a2_]);
00292 }
00293
00294 template<class V> void accept(V & v) const
00295 {
00296 BOOST_BIND_VISIT_EACH(v, a1_, 0);
00297 BOOST_BIND_VISIT_EACH(v, a2_, 0);
00298 }
00299
00300 bool operator==(list2 const & rhs) const
00301 {
00302 return ref_compare(a1_, rhs.a1_, 0) && ref_compare(a2_, rhs.a2_, 0);
00303 }
00304
00305 private:
00306
00307 A1 a1_;
00308 A2 a2_;
00309 };
00310
00311 template<class A1, class A2, class A3> class list3
00312 {
00313 public:
00314
00315 list3(A1 a1, A2 a2, A3 a3): a1_(a1), a2_(a2), a3_(a3) {}
00316
00317 A1 operator[] (boost::arg<1>) const { return a1_; }
00318 A2 operator[] (boost::arg<2>) const { return a2_; }
00319 A3 operator[] (boost::arg<3>) const { return a3_; }
00320
00321 A1 operator[] (boost::arg<1> (*) ()) const { return a1_; }
00322 A2 operator[] (boost::arg<2> (*) ()) const { return a2_; }
00323 A3 operator[] (boost::arg<3> (*) ()) const { return a3_; }
00324
00325 template<class T> T & operator[] (_bi::value<T> & v) const { return v.get(); }
00326
00327 template<class T> T const & operator[] (_bi::value<T> const & v) const { return v.get(); }
00328
00329 template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
00330
00331 template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
00332
00333 template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
00334
00335 template<class R, class F, class A> R operator()(type<R>, F & f, A & a, long)
00336 {
00337 return unwrap(&f, 0)(a[a1_], a[a2_], a[a3_]);
00338 }
00339
00340 template<class R, class F, class A> R operator()(type<R>, F const & f, A & a, long) const
00341 {
00342 return unwrap(&f, 0)(a[a1_], a[a2_], a[a3_]);
00343 }
00344
00345 template<class F, class A> void operator()(type<void>, F & f, A & a, int)
00346 {
00347 unwrap(&f, 0)(a[a1_], a[a2_], a[a3_]);
00348 }
00349
00350 template<class F, class A> void operator()(type<void>, F const & f, A & a, int) const
00351 {
00352 unwrap(&f, 0)(a[a1_], a[a2_], a[a3_]);
00353 }
00354
00355 template<class V> void accept(V & v) const
00356 {
00357 BOOST_BIND_VISIT_EACH(v, a1_, 0);
00358 BOOST_BIND_VISIT_EACH(v, a2_, 0);
00359 BOOST_BIND_VISIT_EACH(v, a3_, 0);
00360 }
00361
00362 bool operator==(list3 const & rhs) const
00363 {
00364 return ref_compare(a1_, rhs.a1_, 0) && ref_compare(a2_, rhs.a2_, 0) && ref_compare(a3_, rhs.a3_, 0);
00365 }
00366
00367 private:
00368
00369 A1 a1_;
00370 A2 a2_;
00371 A3 a3_;
00372 };
00373
00374 template<class A1, class A2, class A3, class A4> class list4
00375 {
00376 public:
00377
00378 list4(A1 a1, A2 a2, A3 a3, A4 a4): a1_(a1), a2_(a2), a3_(a3), a4_(a4) {}
00379
00380 A1 operator[] (boost::arg<1>) const { return a1_; }
00381 A2 operator[] (boost::arg<2>) const { return a2_; }
00382 A3 operator[] (boost::arg<3>) const { return a3_; }
00383 A4 operator[] (boost::arg<4>) const { return a4_; }
00384
00385 A1 operator[] (boost::arg<1> (*) ()) const { return a1_; }
00386 A2 operator[] (boost::arg<2> (*) ()) const { return a2_; }
00387 A3 operator[] (boost::arg<3> (*) ()) const { return a3_; }
00388 A4 operator[] (boost::arg<4> (*) ()) const { return a4_; }
00389
00390 template<class T> T & operator[] (_bi::value<T> & v) const { return v.get(); }
00391
00392 template<class T> T const & operator[] (_bi::value<T> const & v) const { return v.get(); }
00393
00394 template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
00395
00396 template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
00397
00398 template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
00399
00400 template<class R, class F, class A> R operator()(type<R>, F & f, A & a, long)
00401 {
00402 return unwrap(&f, 0)(a[a1_], a[a2_], a[a3_], a[a4_]);
00403 }
00404
00405 template<class R, class F, class A> R operator()(type<R>, F const & f, A & a, long) const
00406 {
00407 return unwrap(&f, 0)(a[a1_], a[a2_], a[a3_], a[a4_]);
00408 }
00409
00410 template<class F, class A> void operator()(type<void>, F & f, A & a, int)
00411 {
00412 unwrap(&f, 0)(a[a1_], a[a2_], a[a3_], a[a4_]);
00413 }
00414
00415 template<class F, class A> void operator()(type<void>, F const & f, A & a, int) const
00416 {
00417 unwrap(&f, 0)(a[a1_], a[a2_], a[a3_], a[a4_]);
00418 }
00419
00420 template<class V> void accept(V & v) const
00421 {
00422 BOOST_BIND_VISIT_EACH(v, a1_, 0);
00423 BOOST_BIND_VISIT_EACH(v, a2_, 0);
00424 BOOST_BIND_VISIT_EACH(v, a3_, 0);
00425 BOOST_BIND_VISIT_EACH(v, a4_, 0);
00426 }
00427
00428 bool operator==(list4 const & rhs) const
00429 {
00430 return
00431 ref_compare(a1_, rhs.a1_, 0) && ref_compare(a2_, rhs.a2_, 0) && ref_compare(a3_, rhs.a3_, 0) &&
00432 ref_compare(a4_, rhs.a4_, 0);
00433 }
00434
00435 private:
00436
00437 A1 a1_;
00438 A2 a2_;
00439 A3 a3_;
00440 A4 a4_;
00441 };
00442
00443 template<class A1, class A2, class A3, class A4, class A5> class list5
00444 {
00445 public:
00446
00447 list5(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5): a1_(a1), a2_(a2), a3_(a3), a4_(a4), a5_(a5) {}
00448
00449 A1 operator[] (boost::arg<1>) const { return a1_; }
00450 A2 operator[] (boost::arg<2>) const { return a2_; }
00451 A3 operator[] (boost::arg<3>) const { return a3_; }
00452 A4 operator[] (boost::arg<4>) const { return a4_; }
00453 A5 operator[] (boost::arg<5>) const { return a5_; }
00454
00455 A1 operator[] (boost::arg<1> (*) ()) const { return a1_; }
00456 A2 operator[] (boost::arg<2> (*) ()) const { return a2_; }
00457 A3 operator[] (boost::arg<3> (*) ()) const { return a3_; }
00458 A4 operator[] (boost::arg<4> (*) ()) const { return a4_; }
00459 A5 operator[] (boost::arg<5> (*) ()) const { return a5_; }
00460
00461 template<class T> T & operator[] (_bi::value<T> & v) const { return v.get(); }
00462
00463 template<class T> T const & operator[] (_bi::value<T> const & v) const { return v.get(); }
00464
00465 template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
00466
00467 template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
00468
00469 template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
00470
00471 template<class R, class F, class A> R operator()(type<R>, F & f, A & a, long)
00472 {
00473 return unwrap(&f, 0)(a[a1_], a[a2_], a[a3_], a[a4_], a[a5_]);
00474 }
00475
00476 template<class R, class F, class A> R operator()(type<R>, F const & f, A & a, long) const
00477 {
00478 return unwrap(&f, 0)(a[a1_], a[a2_], a[a3_], a[a4_], a[a5_]);
00479 }
00480
00481 template<class F, class A> void operator()(type<void>, F & f, A & a, int)
00482 {
00483 unwrap(&f, 0)(a[a1_], a[a2_], a[a3_], a[a4_], a[a5_]);
00484 }
00485
00486 template<class F, class A> void operator()(type<void>, F const & f, A & a, int) const
00487 {
00488 unwrap(&f, 0)(a[a1_], a[a2_], a[a3_], a[a4_], a[a5_]);
00489 }
00490
00491 template<class V> void accept(V & v) const
00492 {
00493 BOOST_BIND_VISIT_EACH(v, a1_, 0);
00494 BOOST_BIND_VISIT_EACH(v, a2_, 0);
00495 BOOST_BIND_VISIT_EACH(v, a3_, 0);
00496 BOOST_BIND_VISIT_EACH(v, a4_, 0);
00497 BOOST_BIND_VISIT_EACH(v, a5_, 0);
00498 }
00499
00500 bool operator==(list5 const & rhs) const
00501 {
00502 return
00503 ref_compare(a1_, rhs.a1_, 0) && ref_compare(a2_, rhs.a2_, 0) && ref_compare(a3_, rhs.a3_, 0) &&
00504 ref_compare(a4_, rhs.a4_, 0) && ref_compare(a5_, rhs.a5_, 0);
00505 }
00506
00507 private:
00508
00509 A1 a1_;
00510 A2 a2_;
00511 A3 a3_;
00512 A4 a4_;
00513 A5 a5_;
00514 };
00515
00516 template<class A1, class A2, class A3, class A4, class A5, class A6> class list6
00517 {
00518 public:
00519
00520 list6(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6): a1_(a1), a2_(a2), a3_(a3), a4_(a4), a5_(a5), a6_(a6) {}
00521
00522 A1 operator[] (boost::arg<1>) const { return a1_; }
00523 A2 operator[] (boost::arg<2>) const { return a2_; }
00524 A3 operator[] (boost::arg<3>) const { return a3_; }
00525 A4 operator[] (boost::arg<4>) const { return a4_; }
00526 A5 operator[] (boost::arg<5>) const { return a5_; }
00527 A6 operator[] (boost::arg<6>) const { return a6_; }
00528
00529 A1 operator[] (boost::arg<1> (*) ()) const { return a1_; }
00530 A2 operator[] (boost::arg<2> (*) ()) const { return a2_; }
00531 A3 operator[] (boost::arg<3> (*) ()) const { return a3_; }
00532 A4 operator[] (boost::arg<4> (*) ()) const { return a4_; }
00533 A5 operator[] (boost::arg<5> (*) ()) const { return a5_; }
00534 A6 operator[] (boost::arg<6> (*) ()) const { return a6_; }
00535
00536 template<class T> T & operator[] (_bi::value<T> & v) const { return v.get(); }
00537
00538 template<class T> T const & operator[] (_bi::value<T> const & v) const { return v.get(); }
00539
00540 template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
00541
00542 template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
00543
00544 template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
00545
00546 template<class R, class F, class A> R operator()(type<R>, F & f, A & a, long)
00547 {
00548 return unwrap(&f, 0)(a[a1_], a[a2_], a[a3_], a[a4_], a[a5_], a[a6_]);
00549 }
00550
00551 template<class R, class F, class A> R operator()(type<R>, F const & f, A & a, long) const
00552 {
00553 return unwrap(&f, 0)(a[a1_], a[a2_], a[a3_], a[a4_], a[a5_], a[a6_]);
00554 }
00555
00556 template<class F, class A> void operator()(type<void>, F & f, A & a, int)
00557 {
00558 unwrap(&f, 0)(a[a1_], a[a2_], a[a3_], a[a4_], a[a5_], a[a6_]);
00559 }
00560
00561 template<class F, class A> void operator()(type<void>, F const & f, A & a, int) const
00562 {
00563 unwrap(&f, 0)(a[a1_], a[a2_], a[a3_], a[a4_], a[a5_], a[a6_]);
00564 }
00565
00566 template<class V> void accept(V & v) const
00567 {
00568 BOOST_BIND_VISIT_EACH(v, a1_, 0);
00569 BOOST_BIND_VISIT_EACH(v, a2_, 0);
00570 BOOST_BIND_VISIT_EACH(v, a3_, 0);
00571 BOOST_BIND_VISIT_EACH(v, a4_, 0);
00572 BOOST_BIND_VISIT_EACH(v, a5_, 0);
00573 BOOST_BIND_VISIT_EACH(v, a6_, 0);
00574 }
00575
00576 bool operator==(list6 const & rhs) const
00577 {
00578 return
00579 ref_compare(a1_, rhs.a1_, 0) && ref_compare(a2_, rhs.a2_, 0) && ref_compare(a3_, rhs.a3_, 0) &&
00580 ref_compare(a4_, rhs.a4_, 0) && ref_compare(a5_, rhs.a5_, 0) && ref_compare(a6_, rhs.a6_, 0);
00581 }
00582
00583 private:
00584
00585 A1 a1_;
00586 A2 a2_;
00587 A3 a3_;
00588 A4 a4_;
00589 A5 a5_;
00590 A6 a6_;
00591 };
00592
00593 template<class A1, class A2, class A3, class A4, class A5, class A6, class A7> class list7
00594 {
00595 public:
00596
00597 list7(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7): a1_(a1), a2_(a2), a3_(a3), a4_(a4), a5_(a5), a6_(a6), a7_(a7) {}
00598
00599 A1 operator[] (boost::arg<1>) const { return a1_; }
00600 A2 operator[] (boost::arg<2>) const { return a2_; }
00601 A3 operator[] (boost::arg<3>) const { return a3_; }
00602 A4 operator[] (boost::arg<4>) const { return a4_; }
00603 A5 operator[] (boost::arg<5>) const { return a5_; }
00604 A6 operator[] (boost::arg<6>) const { return a6_; }
00605 A7 operator[] (boost::arg<7>) const { return a7_; }
00606
00607 A1 operator[] (boost::arg<1> (*) ()) const { return a1_; }
00608 A2 operator[] (boost::arg<2> (*) ()) const { return a2_; }
00609 A3 operator[] (boost::arg<3> (*) ()) const { return a3_; }
00610 A4 operator[] (boost::arg<4> (*) ()) const { return a4_; }
00611 A5 operator[] (boost::arg<5> (*) ()) const { return a5_; }
00612 A6 operator[] (boost::arg<6> (*) ()) const { return a6_; }
00613 A7 operator[] (boost::arg<7> (*) ()) const { return a7_; }
00614
00615 template<class T> T & operator[] (_bi::value<T> & v) const { return v.get(); }
00616
00617 template<class T> T const & operator[] (_bi::value<T> const & v) const { return v.get(); }
00618
00619 template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
00620
00621 template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
00622
00623 template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
00624
00625 template<class R, class F, class A> R operator()(type<R>, F & f, A & a, long)
00626 {
00627 return unwrap(&f, 0)(a[a1_], a[a2_], a[a3_], a[a4_], a[a5_], a[a6_], a[a7_]);
00628 }
00629
00630 template<class R, class F, class A> R operator()(type<R>, F const & f, A & a, long) const
00631 {
00632 return unwrap(&f, 0)(a[a1_], a[a2_], a[a3_], a[a4_], a[a5_], a[a6_], a[a7_]);
00633 }
00634
00635 template<class F, class A> void operator()(type<void>, F & f, A & a, int)
00636 {
00637 unwrap(&f, 0)(a[a1_], a[a2_], a[a3_], a[a4_], a[a5_], a[a6_], a[a7_]);
00638 }
00639
00640 template<class F, class A> void operator()(type<void>, F const & f, A & a, int) const
00641 {
00642 unwrap(&f, 0)(a[a1_], a[a2_], a[a3_], a[a4_], a[a5_], a[a6_], a[a7_]);
00643 }
00644
00645 template<class V> void accept(V & v) const
00646 {
00647 BOOST_BIND_VISIT_EACH(v, a1_, 0);
00648 BOOST_BIND_VISIT_EACH(v, a2_, 0);
00649 BOOST_BIND_VISIT_EACH(v, a3_, 0);
00650 BOOST_BIND_VISIT_EACH(v, a4_, 0);
00651 BOOST_BIND_VISIT_EACH(v, a5_, 0);
00652 BOOST_BIND_VISIT_EACH(v, a6_, 0);
00653 BOOST_BIND_VISIT_EACH(v, a7_, 0);
00654 }
00655
00656 bool operator==(list7 const & rhs) const
00657 {
00658 return
00659 ref_compare(a1_, rhs.a1_, 0) && ref_compare(a2_, rhs.a2_, 0) && ref_compare(a3_, rhs.a3_, 0) &&
00660 ref_compare(a4_, rhs.a4_, 0) && ref_compare(a5_, rhs.a5_, 0) && ref_compare(a6_, rhs.a6_, 0) &&
00661 ref_compare(a7_, rhs.a7_, 0);
00662 }
00663
00664 private:
00665
00666 A1 a1_;
00667 A2 a2_;
00668 A3 a3_;
00669 A4 a4_;
00670 A5 a5_;
00671 A6 a6_;
00672 A7 a7_;
00673 };
00674
00675 template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> class list8
00676 {
00677 public:
00678
00679 list8(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8): a1_(a1), a2_(a2), a3_(a3), a4_(a4), a5_(a5), a6_(a6), a7_(a7), a8_(a8) {}
00680
00681 A1 operator[] (boost::arg<1>) const { return a1_; }
00682 A2 operator[] (boost::arg<2>) const { return a2_; }
00683 A3 operator[] (boost::arg<3>) const { return a3_; }
00684 A4 operator[] (boost::arg<4>) const { return a4_; }
00685 A5 operator[] (boost::arg<5>) const { return a5_; }
00686 A6 operator[] (boost::arg<6>) const { return a6_; }
00687 A7 operator[] (boost::arg<7>) const { return a7_; }
00688 A8 operator[] (boost::arg<8>) const { return a8_; }
00689
00690 A1 operator[] (boost::arg<1> (*) ()) const { return a1_; }
00691 A2 operator[] (boost::arg<2> (*) ()) const { return a2_; }
00692 A3 operator[] (boost::arg<3> (*) ()) const { return a3_; }
00693 A4 operator[] (boost::arg<4> (*) ()) const { return a4_; }
00694 A5 operator[] (boost::arg<5> (*) ()) const { return a5_; }
00695 A6 operator[] (boost::arg<6> (*) ()) const { return a6_; }
00696 A7 operator[] (boost::arg<7> (*) ()) const { return a7_; }
00697 A8 operator[] (boost::arg<8> (*) ()) const { return a8_; }
00698
00699 template<class T> T & operator[] (_bi::value<T> & v) const { return v.get(); }
00700
00701 template<class T> T const & operator[] (_bi::value<T> const & v) const { return v.get(); }
00702
00703 template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
00704
00705 template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
00706
00707 template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
00708
00709 template<class R, class F, class A> R operator()(type<R>, F & f, A & a, long)
00710 {
00711 return unwrap(&f, 0)(a[a1_], a[a2_], a[a3_], a[a4_], a[a5_], a[a6_], a[a7_], a[a8_]);
00712 }
00713
00714 template<class R, class F, class A> R operator()(type<R>, F const & f, A & a, long) const
00715 {
00716 return unwrap(&f, 0)(a[a1_], a[a2_], a[a3_], a[a4_], a[a5_], a[a6_], a[a7_], a[a8_]);
00717 }
00718
00719 template<class F, class A> void operator()(type<void>, F & f, A & a, int)
00720 {
00721 unwrap(&f, 0)(a[a1_], a[a2_], a[a3_], a[a4_], a[a5_], a[a6_], a[a7_], a[a8_]);
00722 }
00723
00724 template<class F, class A> void operator()(type<void>, F const & f, A & a, int) const
00725 {
00726 unwrap(&f, 0)(a[a1_], a[a2_], a[a3_], a[a4_], a[a5_], a[a6_], a[a7_], a[a8_]);
00727 }
00728
00729 template<class V> void accept(V & v) const
00730 {
00731 BOOST_BIND_VISIT_EACH(v, a1_, 0);
00732 BOOST_BIND_VISIT_EACH(v, a2_, 0);
00733 BOOST_BIND_VISIT_EACH(v, a3_, 0);
00734 BOOST_BIND_VISIT_EACH(v, a4_, 0);
00735 BOOST_BIND_VISIT_EACH(v, a5_, 0);
00736 BOOST_BIND_VISIT_EACH(v, a6_, 0);
00737 BOOST_BIND_VISIT_EACH(v, a7_, 0);
00738 BOOST_BIND_VISIT_EACH(v, a8_, 0);
00739 }
00740
00741 bool operator==(list8 const & rhs) const
00742 {
00743 return
00744 ref_compare(a1_, rhs.a1_, 0) && ref_compare(a2_, rhs.a2_, 0) && ref_compare(a3_, rhs.a3_, 0) &&
00745 ref_compare(a4_, rhs.a4_, 0) && ref_compare(a5_, rhs.a5_, 0) && ref_compare(a6_, rhs.a6_, 0) &&
00746 ref_compare(a7_, rhs.a7_, 0) && ref_compare(a8_, rhs.a8_, 0);
00747 }
00748
00749 private:
00750
00751 A1 a1_;
00752 A2 a2_;
00753 A3 a3_;
00754 A4 a4_;
00755 A5 a5_;
00756 A6 a6_;
00757 A7 a7_;
00758 A8 a8_;
00759 };
00760
00761 template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> class list9
00762 {
00763 public:
00764
00765 list9(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9): a1_(a1), a2_(a2), a3_(a3), a4_(a4), a5_(a5), a6_(a6), a7_(a7), a8_(a8), a9_(a9) {}
00766
00767 A1 operator[] (boost::arg<1>) const { return a1_; }
00768 A2 operator[] (boost::arg<2>) const { return a2_; }
00769 A3 operator[] (boost::arg<3>) const { return a3_; }
00770 A4 operator[] (boost::arg<4>) const { return a4_; }
00771 A5 operator[] (boost::arg<5>) const { return a5_; }
00772 A6 operator[] (boost::arg<6>) const { return a6_; }
00773 A7 operator[] (boost::arg<7>) const { return a7_; }
00774 A8 operator[] (boost::arg<8>) const { return a8_; }
00775 A9 operator[] (boost::arg<9>) const { return a9_; }
00776
00777 A1 operator[] (boost::arg<1> (*) ()) const { return a1_; }
00778 A2 operator[] (boost::arg<2> (*) ()) const { return a2_; }
00779 A3 operator[] (boost::arg<3> (*) ()) const { return a3_; }
00780 A4 operator[] (boost::arg<4> (*) ()) const { return a4_; }
00781 A5 operator[] (boost::arg<5> (*) ()) const { return a5_; }
00782 A6 operator[] (boost::arg<6> (*) ()) const { return a6_; }
00783 A7 operator[] (boost::arg<7> (*) ()) const { return a7_; }
00784 A8 operator[] (boost::arg<8> (*) ()) const { return a8_; }
00785 A9 operator[] (boost::arg<9> (*) ()) const { return a9_; }
00786
00787 template<class T> T & operator[] (_bi::value<T> & v) const { return v.get(); }
00788
00789 template<class T> T const & operator[] (_bi::value<T> const & v) const { return v.get(); }
00790
00791 template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
00792
00793 template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> & b) const { return b.eval(*this); }
00794
00795 template<class R, class F, class L> typename result_traits<R, F>::type operator[] (bind_t<R, F, L> const & b) const { return b.eval(*this); }
00796
00797 template<class R, class F, class A> R operator()(type<R>, F & f, A & a, long)
00798 {
00799 return unwrap(&f, 0)(a[a1_], a[a2_], a[a3_], a[a4_], a[a5_], a[a6_], a[a7_], a[a8_], a[a9_]);
00800 }
00801
00802 template<class R, class F, class A> R operator()(type<R>, F const & f, A & a, long) const
00803 {
00804 return unwrap(&f, 0)(a[a1_], a[a2_], a[a3_], a[a4_], a[a5_], a[a6_], a[a7_], a[a8_], a[a9_]);
00805 }
00806
00807 template<class F, class A> void operator()(type<void>, F & f, A & a, int)
00808 {
00809 unwrap(&f, 0)(a[a1_], a[a2_], a[a3_], a[a4_], a[a5_], a[a6_], a[a7_], a[a8_], a[a9_]);
00810 }
00811
00812 template<class F, class A> void operator()(type<void>, F const & f, A & a, int) const
00813 {
00814 unwrap(&f, 0)(a[a1_], a[a2_], a[a3_], a[a4_], a[a5_], a[a6_], a[a7_], a[a8_], a[a9_]);
00815 }
00816
00817 template<class V> void accept(V & v) const
00818 {
00819 BOOST_BIND_VISIT_EACH(v, a1_, 0);
00820 BOOST_BIND_VISIT_EACH(v, a2_, 0);
00821 BOOST_BIND_VISIT_EACH(v, a3_, 0);
00822 BOOST_BIND_VISIT_EACH(v, a4_, 0);
00823 BOOST_BIND_VISIT_EACH(v, a5_, 0);
00824 BOOST_BIND_VISIT_EACH(v, a6_, 0);
00825 BOOST_BIND_VISIT_EACH(v, a7_, 0);
00826 BOOST_BIND_VISIT_EACH(v, a8_, 0);
00827 BOOST_BIND_VISIT_EACH(v, a9_, 0);
00828 }
00829
00830 bool operator==(list9 const & rhs) const
00831 {
00832 return
00833 ref_compare(a1_, rhs.a1_, 0) && ref_compare(a2_, rhs.a2_, 0) && ref_compare(a3_, rhs.a3_, 0) &&
00834 ref_compare(a4_, rhs.a4_, 0) && ref_compare(a5_, rhs.a5_, 0) && ref_compare(a6_, rhs.a6_, 0) &&
00835 ref_compare(a7_, rhs.a7_, 0) && ref_compare(a8_, rhs.a8_, 0) && ref_compare(a9_, rhs.a9_, 0);
00836 }
00837
00838 private:
00839
00840 A1 a1_;
00841 A2 a2_;
00842 A3 a3_;
00843 A4 a4_;
00844 A5 a5_;
00845 A6 a6_;
00846 A7 a7_;
00847 A8 a8_;
00848 A9 a9_;
00849 };
00850
00851
00852
00853 #ifndef BOOST_NO_VOID_RETURNS
00854
00855 template<class R, class F, class L> class bind_t
00856 {
00857 public:
00858
00859 typedef bind_t this_type;
00860
00861 bind_t(F f, L const & l): f_(f), l_(l) {}
00862
00863 #define BOOST_BIND_RETURN return
00864 #include <sysc/packages/boost/bind/bind_template.hpp>
00865 #undef BOOST_BIND_RETURN
00866
00867 };
00868
00869 #else
00870
00871 template<class R> struct bind_t_generator
00872 {
00873
00874 template<class F, class L> class implementation
00875 {
00876 public:
00877
00878 typedef implementation this_type;
00879
00880 implementation(F f, L const & l): f_(f), l_(l) {}
00881
00882 #define BOOST_BIND_RETURN return
00883 #include <sysc/packages/boost/bind/bind_template.hpp>
00884 #undef BOOST_BIND_RETURN
00885
00886 };
00887
00888 };
00889
00890 template<> struct bind_t_generator<void>
00891 {
00892
00893 template<class F, class L> class implementation
00894 {
00895 private:
00896
00897 typedef void R;
00898
00899 public:
00900
00901 typedef implementation this_type;
00902
00903 implementation(F f, L const & l): f_(f), l_(l) {}
00904
00905 #define BOOST_BIND_RETURN
00906 #include <sysc/packages/boost/bind/bind_template.hpp>
00907 #undef BOOST_BIND_RETURN
00908
00909 };
00910
00911 };
00912
00913 template<class R2, class F, class L> class bind_t: public bind_t_generator<R2>::BOOST_NESTED_TEMPLATE implementation<F, L>
00914 {
00915 public:
00916
00917 bind_t(F f, L const & l): bind_t_generator<R2>::BOOST_NESTED_TEMPLATE implementation<F, L>(f, l) {}
00918
00919 };
00920
00921 #endif
00922
00923
00924
00925 #ifndef BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
00926
00927
00928
00929 # ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
00930
00931 template<class R, class F, class L> bool function_equal( bind_t<R, F, L> const & a, bind_t<R, F, L> const & b )
00932 {
00933 return a.compare(b);
00934 }
00935
00936 # else
00937
00938 template<class R, class F, class L> bool function_equal_impl( bind_t<R, F, L> const & a, bind_t<R, F, L> const & b, int )
00939 {
00940 return a.compare(b);
00941 }
00942
00943 # endif // #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
00944
00945 #else // BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
00946
00947
00948
00949 }
00950
00951 # ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
00952
00953 template<class R, class F, class L> bool function_equal( _bi::bind_t<R, F, L> const & a, _bi::bind_t<R, F, L> const & b )
00954 {
00955 return a.compare(b);
00956 }
00957
00958 # else
00959
00960 template<class R, class F, class L> bool function_equal_impl( _bi::bind_t<R, F, L> const & a, _bi::bind_t<R, F, L> const & b, int )
00961 {
00962 return a.compare(b);
00963 }
00964
00965 # endif // #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
00966
00967 namespace _bi
00968 {
00969
00970 #endif // BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
00971
00972
00973
00974 #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) || (__SUNPRO_CC >= 0x530)
00975
00976 template<class T> struct add_value
00977 {
00978 typedef _bi::value<T> type;
00979 };
00980
00981 template<class T> struct add_value< value<T> >
00982 {
00983 typedef _bi::value<T> type;
00984 };
00985
00986 template<class T> struct add_value< reference_wrapper<T> >
00987 {
00988 typedef reference_wrapper<T> type;
00989 };
00990
00991 template<int I> struct add_value< arg<I> >
00992 {
00993 typedef boost::arg<I> type;
00994 };
00995
00996 template<int I> struct add_value< arg<I> (*) () >
00997 {
00998 typedef boost::arg<I> (*type) ();
00999 };
01000
01001 template<class R, class F, class L> struct add_value< bind_t<R, F, L> >
01002 {
01003 typedef bind_t<R, F, L> type;
01004 };
01005
01006 #else
01007
01008 template<int I> struct _avt_0;
01009
01010 template<> struct _avt_0<1>
01011 {
01012 template<class T> struct inner
01013 {
01014 typedef T type;
01015 };
01016 };
01017
01018 template<> struct _avt_0<2>
01019 {
01020 template<class T> struct inner
01021 {
01022 typedef value<T> type;
01023 };
01024 };
01025
01026 typedef char (&_avt_r1) [1];
01027 typedef char (&_avt_r2) [2];
01028
01029 template<class T> _avt_r1 _avt_f(value<T>);
01030 template<class T> _avt_r1 _avt_f(reference_wrapper<T>);
01031 template<int I> _avt_r1 _avt_f(arg<I>);
01032 template<int I> _avt_r1 _avt_f(arg<I> (*) ());
01033 template<class R, class F, class L> _avt_r1 _avt_f(bind_t<R, F, L>);
01034
01035 _avt_r2 _avt_f(...);
01036
01037 template<class T> struct add_value
01038 {
01039 static T t();
01040 typedef typename _avt_0<sizeof(_avt_f(t()))>::template inner<T>::type type;
01041 };
01042
01043 #endif
01044
01045
01046
01047 template<class A1> struct list_av_1
01048 {
01049 typedef typename add_value<A1>::type B1;
01050 typedef list1<B1> type;
01051 };
01052
01053 template<class A1, class A2> struct list_av_2
01054 {
01055 typedef typename add_value<A1>::type B1;
01056 typedef typename add_value<A2>::type B2;
01057 typedef list2<B1, B2> type;
01058 };
01059
01060 template<class A1, class A2, class A3> struct list_av_3
01061 {
01062 typedef typename add_value<A1>::type B1;
01063 typedef typename add_value<A2>::type B2;
01064 typedef typename add_value<A3>::type B3;
01065 typedef list3<B1, B2, B3> type;
01066 };
01067
01068 template<class A1, class A2, class A3, class A4> struct list_av_4
01069 {
01070 typedef typename add_value<A1>::type B1;
01071 typedef typename add_value<A2>::type B2;
01072 typedef typename add_value<A3>::type B3;
01073 typedef typename add_value<A4>::type B4;
01074 typedef list4<B1, B2, B3, B4> type;
01075 };
01076
01077 template<class A1, class A2, class A3, class A4, class A5> struct list_av_5
01078 {
01079 typedef typename add_value<A1>::type B1;
01080 typedef typename add_value<A2>::type B2;
01081 typedef typename add_value<A3>::type B3;
01082 typedef typename add_value<A4>::type B4;
01083 typedef typename add_value<A5>::type B5;
01084 typedef list5<B1, B2, B3, B4, B5> type;
01085 };
01086
01087 template<class A1, class A2, class A3, class A4, class A5, class A6> struct list_av_6
01088 {
01089 typedef typename add_value<A1>::type B1;
01090 typedef typename add_value<A2>::type B2;
01091 typedef typename add_value<A3>::type B3;
01092 typedef typename add_value<A4>::type B4;
01093 typedef typename add_value<A5>::type B5;
01094 typedef typename add_value<A6>::type B6;
01095 typedef list6<B1, B2, B3, B4, B5, B6> type;
01096 };
01097
01098 template<class A1, class A2, class A3, class A4, class A5, class A6, class A7> struct list_av_7
01099 {
01100 typedef typename add_value<A1>::type B1;
01101 typedef typename add_value<A2>::type B2;
01102 typedef typename add_value<A3>::type B3;
01103 typedef typename add_value<A4>::type B4;
01104 typedef typename add_value<A5>::type B5;
01105 typedef typename add_value<A6>::type B6;
01106 typedef typename add_value<A7>::type B7;
01107 typedef list7<B1, B2, B3, B4, B5, B6, B7> type;
01108 };
01109
01110 template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> struct list_av_8
01111 {
01112 typedef typename add_value<A1>::type B1;
01113 typedef typename add_value<A2>::type B2;
01114 typedef typename add_value<A3>::type B3;
01115 typedef typename add_value<A4>::type B4;
01116 typedef typename add_value<A5>::type B5;
01117 typedef typename add_value<A6>::type B6;
01118 typedef typename add_value<A7>::type B7;
01119 typedef typename add_value<A8>::type B8;
01120 typedef list8<B1, B2, B3, B4, B5, B6, B7, B8> type;
01121 };
01122
01123 template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> struct list_av_9
01124 {
01125 typedef typename add_value<A1>::type B1;
01126 typedef typename add_value<A2>::type B2;
01127 typedef typename add_value<A3>::type B3;
01128 typedef typename add_value<A4>::type B4;
01129 typedef typename add_value<A5>::type B5;
01130 typedef typename add_value<A6>::type B6;
01131 typedef typename add_value<A7>::type B7;
01132 typedef typename add_value<A8>::type B8;
01133 typedef typename add_value<A9>::type B9;
01134 typedef list9<B1, B2, B3, B4, B5, B6, B7, B8, B9> type;
01135 };
01136
01137
01138
01139 struct logical_not
01140 {
01141 template<class V> bool operator()(V const & v) const { return !v; }
01142 };
01143
01144 template<class R, class F, class L>
01145 bind_t< bool, logical_not, list1< bind_t<R, F, L> > >
01146 operator! (bind_t<R, F, L> const & f)
01147 {
01148 typedef list1< bind_t<R, F, L> > list_type;
01149 return bind_t<bool, logical_not, list_type> ( logical_not(), list_type(f) );
01150 }
01151
01152
01153
01154 #define BOOST_BIND_OPERATOR( op, name ) \
01155 \
01156 struct name \
01157 { \
01158 template<class V, class W> bool operator()(V const & v, W const & w) const { return v op w; } \
01159 }; \
01160 \
01161 template<class R, class F, class L, class A2> \
01162 bind_t< bool, name, list2< bind_t<R, F, L>, typename add_value<A2>::type > > \
01163 operator op (bind_t<R, F, L> const & f, A2 a2) \
01164 { \
01165 typedef typename add_value<A2>::type B2; \
01166 typedef list2< bind_t<R, F, L>, B2> list_type; \
01167 return bind_t<bool, name, list_type> ( name(), list_type(f, a2) ); \
01168 }
01169
01170 BOOST_BIND_OPERATOR( ==, equal )
01171 BOOST_BIND_OPERATOR( !=, not_equal )
01172
01173 BOOST_BIND_OPERATOR( <, less )
01174 BOOST_BIND_OPERATOR( <=, less_equal )
01175
01176 BOOST_BIND_OPERATOR( >, greater )
01177 BOOST_BIND_OPERATOR( >=, greater_equal )
01178
01179 #undef BOOST_BIND_OPERATOR
01180
01181 #if defined(__GNUC__) && BOOST_WORKAROUND(__GNUC__, < 3)
01182
01183
01184
01185 #define BOOST_BIND_OPERATOR( op, name ) \
01186 \
01187 template<class R, class F, class L> \
01188 bind_t< bool, name, list2< bind_t<R, F, L>, bind_t<R, F, L> > > \
01189 operator op (bind_t<R, F, L> const & f, bind_t<R, F, L> const & g) \
01190 { \
01191 typedef list2< bind_t<R, F, L>, bind_t<R, F, L> > list_type; \
01192 return bind_t<bool, name, list_type> ( name(), list_type(f, g) ); \
01193 }
01194
01195 BOOST_BIND_OPERATOR( !=, not_equal )
01196 BOOST_BIND_OPERATOR( <=, less_equal )
01197 BOOST_BIND_OPERATOR( >, greater )
01198 BOOST_BIND_OPERATOR( >=, greater_equal )
01199
01200 #endif
01201
01202 }
01203
01204
01205
01206 template<class V, class T> void visit_each(V & v, _bi::value<T> const & t, int)
01207 {
01208 BOOST_BIND_VISIT_EACH(v, t.get(), 0);
01209 }
01210
01211 template<class V, class R, class F, class L> void visit_each(V & v, _bi::bind_t<R, F, L> const & t, int)
01212 {
01213 t.accept(v);
01214 }
01215
01216
01217
01218 #ifndef BOOST_BIND
01219 #define BOOST_BIND bind
01220 #endif
01221
01222
01223
01224 template<class R, class F>
01225 _bi::bind_t<R, F, _bi::list0>
01226 BOOST_BIND(F f)
01227 {
01228 typedef _bi::list0 list_type;
01229 return _bi::bind_t<R, F, list_type> (f, list_type());
01230 }
01231
01232 template<class R, class F, class A1>
01233 _bi::bind_t<R, F, typename _bi::list_av_1<A1>::type>
01234 BOOST_BIND(F f, A1 a1)
01235 {
01236 typedef typename _bi::list_av_1<A1>::type list_type;
01237 return _bi::bind_t<R, F, list_type> (f, list_type(a1));
01238 }
01239
01240 template<class R, class F, class A1, class A2>
01241 _bi::bind_t<R, F, typename _bi::list_av_2<A1, A2>::type>
01242 BOOST_BIND(F f, A1 a1, A2 a2)
01243 {
01244 typedef typename _bi::list_av_2<A1, A2>::type list_type;
01245 return _bi::bind_t<R, F, list_type> (f, list_type(a1, a2));
01246 }
01247
01248 template<class R, class F, class A1, class A2, class A3>
01249 _bi::bind_t<R, F, typename _bi::list_av_3<A1, A2, A3>::type>
01250 BOOST_BIND(F f, A1 a1, A2 a2, A3 a3)
01251 {
01252 typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
01253 return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3));
01254 }
01255
01256 template<class R, class F, class A1, class A2, class A3, class A4>
01257 _bi::bind_t<R, F, typename _bi::list_av_4<A1, A2, A3, A4>::type>
01258 BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4)
01259 {
01260 typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
01261 return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4));
01262 }
01263
01264 template<class R, class F, class A1, class A2, class A3, class A4, class A5>
01265 _bi::bind_t<R, F, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
01266 BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
01267 {
01268 typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
01269 return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5));
01270 }
01271
01272 template<class R, class F, class A1, class A2, class A3, class A4, class A5, class A6>
01273 _bi::bind_t<R, F, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
01274 BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
01275 {
01276 typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
01277 return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6));
01278 }
01279
01280 template<class R, class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7>
01281 _bi::bind_t<R, F, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
01282 BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
01283 {
01284 typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
01285 return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7));
01286 }
01287
01288 template<class R, class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
01289 _bi::bind_t<R, F, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
01290 BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
01291 {
01292 typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
01293 return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8));
01294 }
01295
01296 template<class R, class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
01297 _bi::bind_t<R, F, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
01298 BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
01299 {
01300 typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
01301 return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9));
01302 }
01303
01304
01305
01306 template<class R, class F>
01307 _bi::bind_t<R, F, _bi::list0>
01308 BOOST_BIND(boost::type<R>, F f)
01309 {
01310 typedef _bi::list0 list_type;
01311 return _bi::bind_t<R, F, list_type> (f, list_type());
01312 }
01313
01314 template<class R, class F, class A1>
01315 _bi::bind_t<R, F, typename _bi::list_av_1<A1>::type>
01316 BOOST_BIND(boost::type<R>, F f, A1 a1)
01317 {
01318 typedef typename _bi::list_av_1<A1>::type list_type;
01319 return _bi::bind_t<R, F, list_type> (f, list_type(a1));
01320 }
01321
01322 template<class R, class F, class A1, class A2>
01323 _bi::bind_t<R, F, typename _bi::list_av_2<A1, A2>::type>
01324 BOOST_BIND(boost::type<R>, F f, A1 a1, A2 a2)
01325 {
01326 typedef typename _bi::list_av_2<A1, A2>::type list_type;
01327 return _bi::bind_t<R, F, list_type> (f, list_type(a1, a2));
01328 }
01329
01330 template<class R, class F, class A1, class A2, class A3>
01331 _bi::bind_t<R, F, typename _bi::list_av_3<A1, A2, A3>::type>
01332 BOOST_BIND(boost::type<R>, F f, A1 a1, A2 a2, A3 a3)
01333 {
01334 typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
01335 return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3));
01336 }
01337
01338 template<class R, class F, class A1, class A2, class A3, class A4>
01339 _bi::bind_t<R, F, typename _bi::list_av_4<A1, A2, A3, A4>::type>
01340 BOOST_BIND(boost::type<R>, F f, A1 a1, A2 a2, A3 a3, A4 a4)
01341 {
01342 typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
01343 return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4));
01344 }
01345
01346 template<class R, class F, class A1, class A2, class A3, class A4, class A5>
01347 _bi::bind_t<R, F, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
01348 BOOST_BIND(boost::type<R>, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
01349 {
01350 typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
01351 return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5));
01352 }
01353
01354 template<class R, class F, class A1, class A2, class A3, class A4, class A5, class A6>
01355 _bi::bind_t<R, F, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
01356 BOOST_BIND(boost::type<R>, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
01357 {
01358 typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
01359 return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6));
01360 }
01361
01362 template<class R, class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7>
01363 _bi::bind_t<R, F, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
01364 BOOST_BIND(boost::type<R>, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
01365 {
01366 typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
01367 return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7));
01368 }
01369
01370 template<class R, class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
01371 _bi::bind_t<R, F, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
01372 BOOST_BIND(boost::type<R>, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
01373 {
01374 typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
01375 return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8));
01376 }
01377
01378 template<class R, class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
01379 _bi::bind_t<R, F, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
01380 BOOST_BIND(boost::type<R>, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
01381 {
01382 typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
01383 return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9));
01384 }
01385
01386 #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
01387
01388
01389
01390 template<class F>
01391 _bi::bind_t<_bi::unspecified, F, _bi::list0>
01392 BOOST_BIND(F f)
01393 {
01394 typedef _bi::list0 list_type;
01395 return _bi::bind_t<_bi::unspecified, F, list_type> (f, list_type());
01396 }
01397
01398 template<class F, class A1>
01399 _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_1<A1>::type>
01400 BOOST_BIND(F f, A1 a1)
01401 {
01402 typedef typename _bi::list_av_1<A1>::type list_type;
01403 return _bi::bind_t<_bi::unspecified, F, list_type> (f, list_type(a1));
01404 }
01405
01406 template<class F, class A1, class A2>
01407 _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_2<A1, A2>::type>
01408 BOOST_BIND(F f, A1 a1, A2 a2)
01409 {
01410 typedef typename _bi::list_av_2<A1, A2>::type list_type;
01411 return _bi::bind_t<_bi::unspecified, F, list_type> (f, list_type(a1, a2));
01412 }
01413
01414 template<class F, class A1, class A2, class A3>
01415 _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_3<A1, A2, A3>::type>
01416 BOOST_BIND(F f, A1 a1, A2 a2, A3 a3)
01417 {
01418 typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
01419 return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3));
01420 }
01421
01422 template<class F, class A1, class A2, class A3, class A4>
01423 _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_4<A1, A2, A3, A4>::type>
01424 BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4)
01425 {
01426 typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
01427 return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4));
01428 }
01429
01430 template<class F, class A1, class A2, class A3, class A4, class A5>
01431 _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
01432 BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
01433 {
01434 typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
01435 return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5));
01436 }
01437
01438 template<class F, class A1, class A2, class A3, class A4, class A5, class A6>
01439 _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
01440 BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
01441 {
01442 typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
01443 return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6));
01444 }
01445
01446 template<class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7>
01447 _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
01448 BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
01449 {
01450 typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
01451 return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7));
01452 }
01453
01454 template<class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
01455 _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
01456 BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
01457 {
01458 typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
01459 return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8));
01460 }
01461
01462 template<class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
01463 _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
01464 BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
01465 {
01466 typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
01467 return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9));
01468 }
01469
01470 #endif // !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
01471
01472
01473
01474 #define BOOST_BIND_CC
01475 #define BOOST_BIND_ST
01476
01477 #include <sysc/packages/boost/bind/bind_cc.hpp>
01478
01479 #undef BOOST_BIND_CC
01480 #undef BOOST_BIND_ST
01481
01482 #ifdef BOOST_BIND_ENABLE_STDCALL
01483
01484 #define BOOST_BIND_CC __stdcall
01485 #define BOOST_BIND_ST
01486
01487 #include <sysc/packages/boost/bind/bind_cc.hpp>
01488
01489 #undef BOOST_BIND_CC
01490 #undef BOOST_BIND_ST
01491
01492 #endif
01493
01494 #ifdef BOOST_BIND_ENABLE_FASTCALL
01495
01496 #define BOOST_BIND_CC __fastcall
01497 #define BOOST_BIND_ST
01498
01499 #include <sysc/packages/boost/bind/bind_cc.hpp>
01500
01501 #undef BOOST_BIND_CC
01502 #undef BOOST_BIND_ST
01503
01504 #endif
01505
01506 #ifdef BOOST_BIND_ENABLE_PASCAL
01507
01508 #define BOOST_BIND_ST pascal
01509 #define BOOST_BIND_CC
01510
01511 #include <sysc/packages/boost/bind/bind_cc.hpp>
01512
01513 #undef BOOST_BIND_ST
01514 #undef BOOST_BIND_CC
01515
01516 #endif
01517
01518
01519
01520 #define BOOST_BIND_MF_NAME(X) X
01521 #define BOOST_BIND_MF_CC
01522
01523 #include <sysc/packages/boost/bind/bind_mf_cc.hpp>
01524
01525 #undef BOOST_BIND_MF_NAME
01526 #undef BOOST_BIND_MF_CC
01527
01528 #ifdef BOOST_MEM_FN_ENABLE_CDECL
01529
01530 #define BOOST_BIND_MF_NAME(X) X##_cdecl
01531 #define BOOST_BIND_MF_CC __cdecl
01532
01533 #include <sysc/packages/boost/bind/bind_mf_cc.hpp>
01534
01535 #undef BOOST_BIND_MF_NAME
01536 #undef BOOST_BIND_MF_CC
01537
01538 #endif
01539
01540 #ifdef BOOST_MEM_FN_ENABLE_STDCALL
01541
01542 #define BOOST_BIND_MF_NAME(X) X##_stdcall
01543 #define BOOST_BIND_MF_CC __stdcall
01544
01545 #include <sysc/packages/boost/bind/bind_mf_cc.hpp>
01546
01547 #undef BOOST_BIND_MF_NAME
01548 #undef BOOST_BIND_MF_CC
01549
01550 #endif
01551
01552 #ifdef BOOST_MEM_FN_ENABLE_FASTCALL
01553
01554 #define BOOST_BIND_MF_NAME(X) X##_fastcall
01555 #define BOOST_BIND_MF_CC __fastcall
01556
01557 #include <sysc/packages/boost/bind/bind_mf_cc.hpp>
01558
01559 #undef BOOST_BIND_MF_NAME
01560 #undef BOOST_BIND_MF_CC
01561
01562 #endif
01563
01564
01565
01566
01567
01568
01569
01570
01571
01572
01573
01574
01575
01576
01577
01578
01579
01580
01581
01582
01583
01584
01585
01586
01587
01588
01589
01590
01591
01592
01593
01594
01595
01596
01597
01598
01599
01600
01601
01602
01603
01604
01605
01606
01607
01608
01609
01610
01611
01612
01613
01614 template<class R, class T, class A1>
01615 _bi::bind_t< R, _mfi::dm<R, T>, typename _bi::list_av_1<A1>::type >
01616 BOOST_BIND(R T::*f, A1 a1)
01617 {
01618 typedef _mfi::dm<R, T> F;
01619 typedef typename _bi::list_av_1<A1>::type list_type;
01620 return _bi::bind_t<R, F, list_type>( F(f), list_type(a1) );
01621 }
01622
01623 }
01624
01625 #ifndef BOOST_BIND_NO_PLACEHOLDERS
01626
01627 # include <sysc/packages/boost/bind/placeholders.hpp>
01628
01629 #endif
01630
01631 #ifdef BOOST_MSVC
01632 # pragma warning(default: 4512) // assignment operator could not be generated
01633 # pragma warning(pop)
01634 #endif
01635
01636 #endif // #ifndef BOOST_BIND_HPP_INCLUDED