]> git.lyx.org Git - lyx.git/blob - boost/boost/bind.hpp
complie fix
[lyx.git] / boost / boost / bind.hpp
1 #ifndef BOOST_BIND_HPP_INCLUDED
2 #define BOOST_BIND_HPP_INCLUDED
3
4 #if _MSC_VER >= 1020
5 #pragma once
6 #endif
7
8 //
9 //  bind.hpp - binds function objects to arguments
10 //
11 //  Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd.
12 //  Copyright (c) 2001 David Abrahams
13 //
14 //  Permission to copy, use, modify, sell and distribute this software
15 //  is granted provided this copyright notice appears in all copies.
16 //  This software is provided "as is" without express or implied
17 //  warranty, and with no claim as to its suitability for any purpose.
18 //
19 //  See http://www.boost.org/libs/bind/bind.html for documentation.
20 //
21
22 #include <boost/config.hpp>
23 #include <boost/ref.hpp>
24 #include <boost/mem_fn.hpp>
25 #include <boost/bind/arg.hpp>
26
27 // Borland-specific bug, visit_each() silently fails to produce code
28
29 #if defined(__BORLANDC__)
30 #  define BOOST_BIND_VISIT_EACH boost::visit_each
31 #else
32 #  define BOOST_BIND_VISIT_EACH visit_each
33 #endif
34
35 #ifdef BOOST_MSVC
36 # pragma warning(push)
37 # pragma warning(disable: 4512) // assignment operator could not be generated
38 #endif
39
40 namespace boost
41 {
42
43 namespace _bi // implementation details
44 {
45
46 // result_traits
47
48 template<class R, class F> struct result_traits
49 {
50     typedef R type;
51 };
52
53 #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
54
55 struct unspecified {};
56
57 template<class F> struct result_traits<unspecified, F>
58 {
59     typedef typename F::result_type type;
60 };
61
62 template<class F> struct result_traits< unspecified, reference_wrapper<F> >
63 {
64     typedef typename F::result_type type;
65 };
66
67 #endif
68
69 // bind_t forward declaration for listN
70
71 template<class R, class F, class L> class bind_t;
72
73 // value
74
75 template<class T> class value
76 {
77 public:
78
79     value(T const & t): t_(t) {}
80
81     T & get() { return t_; }
82     T const & get() const { return t_; }
83
84 private:
85
86     T t_;
87 };
88
89 // type
90
91 template<class T> class type {};
92
93 // unwrap
94
95 template<class F> inline F & unwrap(F & f, long)
96 {
97     return f;
98 }
99
100 template<class F> inline F & unwrap(reference_wrapper<F> & f, int)
101 {
102     return f;
103 }
104
105 template<class F> inline F & unwrap(reference_wrapper<F> const & f, int)
106 {
107     return f;
108 }
109
110 // listN
111
112 #ifdef BOOST_NO_VOID_RETURNS
113
114 template <class R> struct evaluator0;
115 template <class R> struct evaluator1;
116 template <class R> struct evaluator2;
117 template <class R> struct evaluator3;
118 template <class R> struct evaluator4;
119 template <class R> struct evaluator5;
120 template <class R> struct evaluator6;
121 template <class R> struct evaluator7;
122 template <class R> struct evaluator8;
123 template <class R> struct evaluator9;
124
125 #endif
126
127 class list0
128 {
129 public:
130
131     list0() {}
132
133     template<class T> T & operator[] (value<T> & v) const { return v.get(); }
134
135     template<class T> T const & operator[] (value<T> const & v) const { return v.get(); }
136
137     template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
138
139     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); }
140
141     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); }
142
143     template<class R, class F, class A> R operator()(type<R>, F f, A &) const
144     {
145         return unwrap(f, 0)();
146     }
147
148     template<class V> void accept(V &) const
149     {
150     }
151
152 #ifdef BOOST_NO_VOID_RETURNS
153
154     template<class R> struct evaluator
155     {
156         typedef evaluator0<R> type;
157     };
158
159 #endif
160
161 };
162
163 template<class A1> class list1
164 {
165 public:
166
167     explicit list1(A1 a1): a1_(a1) {}
168
169     A1 operator[] (boost::arg<1>) const { return a1_; }
170
171     A1 operator[] (boost::arg<1> (*) ()) const { return a1_; }
172
173     template<class T> T & operator[] (value<T> & v) const { return v.get(); }
174
175     template<class T> T const & operator[] (value<T> const & v) const { return v.get(); }
176
177     template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
178
179     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); }
180
181     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); }
182
183     template<class R, class F, class A> R operator()(type<R>, F f, A & a) const
184     {
185         return unwrap(f, 0)(a[a1_]);
186     }
187
188     template<class V> void accept(V & v) const
189     {
190         BOOST_BIND_VISIT_EACH(v, a1_, 0);
191     }
192
193 #ifdef BOOST_NO_VOID_RETURNS
194
195     template<class R> struct evaluator
196     {
197         typedef evaluator1<R> type;
198     };
199
200 #else
201
202 private:
203
204 #endif
205
206     A1 a1_;
207 };
208
209 template<class A1, class A2> class list2
210 {
211 public:
212
213     list2(A1 a1, A2 a2): a1_(a1), a2_(a2) {}
214
215     A1 operator[] (boost::arg<1>) const { return a1_; }
216     A2 operator[] (boost::arg<2>) const { return a2_; }
217
218     A1 operator[] (boost::arg<1> (*) ()) const { return a1_; }
219     A2 operator[] (boost::arg<2> (*) ()) const { return a2_; }
220
221     template<class T> T & operator[] (value<T> & v) const { return v.get(); }
222
223     template<class T> T const & operator[] (value<T> const & v) const { return v.get(); }
224
225     template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
226
227     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); }
228
229     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); }
230
231     template<class R, class F, class A> R operator()(type<R>, F f, A & a) const
232     {
233         return unwrap(f, 0)(a[a1_], a[a2_]);
234     }
235
236     template<class V> void accept(V & v) const
237     {
238         BOOST_BIND_VISIT_EACH(v, a1_, 0);
239         BOOST_BIND_VISIT_EACH(v, a2_, 0);
240     }
241
242 #ifdef BOOST_NO_VOID_RETURNS
243
244     template<class R> struct evaluator
245     {
246         typedef evaluator2<R> type;
247     };
248
249 #else
250
251 private:
252
253 #endif
254
255     A1 a1_;
256     A2 a2_;
257 };
258
259 template<class A1, class A2, class A3> class list3
260 {
261 public:
262
263     list3(A1 a1, A2 a2, A3 a3): a1_(a1), a2_(a2), a3_(a3) {}
264
265     A1 operator[] (boost::arg<1>) const { return a1_; }
266     A2 operator[] (boost::arg<2>) const { return a2_; }
267     A3 operator[] (boost::arg<3>) const { return a3_; }
268
269     A1 operator[] (boost::arg<1> (*) ()) const { return a1_; }
270     A2 operator[] (boost::arg<2> (*) ()) const { return a2_; }
271     A3 operator[] (boost::arg<3> (*) ()) const { return a3_; }
272
273     template<class T> T & operator[] (value<T> & v) const { return v.get(); }
274
275     template<class T> T const & operator[] (value<T> const & v) const { return v.get(); }
276
277     template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
278
279     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); }
280
281     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); }
282
283     template<class R, class F, class A> R operator()(type<R>, F f, A & a) const
284     {
285         return unwrap(f, 0)(a[a1_], a[a2_], a[a3_]);
286     }
287
288     template<class V> void accept(V & v) const
289     {
290         BOOST_BIND_VISIT_EACH(v, a1_, 0);
291         BOOST_BIND_VISIT_EACH(v, a2_, 0);
292         BOOST_BIND_VISIT_EACH(v, a3_, 0);
293     }
294
295 #ifdef BOOST_NO_VOID_RETURNS
296
297     template<class R> struct evaluator
298     {
299         typedef evaluator3<R> type;
300     };
301
302 #else
303
304 private:
305
306 #endif
307
308     A1 a1_;
309     A2 a2_;
310     A3 a3_;
311 };
312
313 template<class A1, class A2, class A3, class A4> class list4
314 {
315 public:
316
317     list4(A1 a1, A2 a2, A3 a3, A4 a4): a1_(a1), a2_(a2), a3_(a3), a4_(a4) {}
318
319     A1 operator[] (boost::arg<1>) const { return a1_; }
320     A2 operator[] (boost::arg<2>) const { return a2_; }
321     A3 operator[] (boost::arg<3>) const { return a3_; }
322     A4 operator[] (boost::arg<4>) const { return a4_; }
323
324     A1 operator[] (boost::arg<1> (*) ()) const { return a1_; }
325     A2 operator[] (boost::arg<2> (*) ()) const { return a2_; }
326     A3 operator[] (boost::arg<3> (*) ()) const { return a3_; }
327     A4 operator[] (boost::arg<4> (*) ()) const { return a4_; }
328
329     template<class T> T & operator[] (value<T> & v) const { return v.get(); }
330
331     template<class T> T const & operator[] (value<T> const & v) const { return v.get(); }
332
333     template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
334
335     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); }
336
337     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); }
338
339     template<class R, class F, class A> R operator()(type<R>, F f, A & a) const
340     {
341         return unwrap(f, 0)(a[a1_], a[a2_], a[a3_], a[a4_]);
342     }
343
344     template<class V> void accept(V & v) const
345     {
346         BOOST_BIND_VISIT_EACH(v, a1_, 0);
347         BOOST_BIND_VISIT_EACH(v, a2_, 0);
348         BOOST_BIND_VISIT_EACH(v, a3_, 0);
349         BOOST_BIND_VISIT_EACH(v, a4_, 0);
350     }
351
352 #ifdef BOOST_NO_VOID_RETURNS
353
354     template<class R> struct evaluator
355     {
356         typedef evaluator4<R> type;
357     };
358
359 #else
360
361 private:
362
363 #endif
364
365     A1 a1_;
366     A2 a2_;
367     A3 a3_;
368     A4 a4_;
369 };
370
371 template<class A1, class A2, class A3, class A4, class A5> class list5
372 {
373 public:
374
375     list5(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5): a1_(a1), a2_(a2), a3_(a3), a4_(a4), a5_(a5) {}
376
377     A1 operator[] (boost::arg<1>) const { return a1_; }
378     A2 operator[] (boost::arg<2>) const { return a2_; }
379     A3 operator[] (boost::arg<3>) const { return a3_; }
380     A4 operator[] (boost::arg<4>) const { return a4_; }
381     A5 operator[] (boost::arg<5>) const { return a5_; }
382
383     A1 operator[] (boost::arg<1> (*) ()) const { return a1_; }
384     A2 operator[] (boost::arg<2> (*) ()) const { return a2_; }
385     A3 operator[] (boost::arg<3> (*) ()) const { return a3_; }
386     A4 operator[] (boost::arg<4> (*) ()) const { return a4_; }
387     A5 operator[] (boost::arg<5> (*) ()) const { return a5_; }
388
389     template<class T> T & operator[] (value<T> & v) const { return v.get(); }
390
391     template<class T> T const & operator[] (value<T> const & v) const { return v.get(); }
392
393     template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
394
395     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); }
396
397     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); }
398
399     template<class R, class F, class A> R operator()(type<R>, F f, A & a) const
400     {
401         return unwrap(f, 0)(a[a1_], a[a2_], a[a3_], a[a4_], a[a5_]);
402     }
403
404     template<class V> void accept(V & v) const
405     {
406         BOOST_BIND_VISIT_EACH(v, a1_, 0);
407         BOOST_BIND_VISIT_EACH(v, a2_, 0);
408         BOOST_BIND_VISIT_EACH(v, a3_, 0);
409         BOOST_BIND_VISIT_EACH(v, a4_, 0);
410         BOOST_BIND_VISIT_EACH(v, a5_, 0);
411     }
412
413 #ifdef BOOST_NO_VOID_RETURNS
414
415     template<class R> struct evaluator
416     {
417         typedef evaluator5<R> type;
418     };
419
420 #else
421
422 private:
423
424 #endif
425
426     A1 a1_;
427     A2 a2_;
428     A3 a3_;
429     A4 a4_;
430     A5 a5_;
431 };
432
433 template<class A1, class A2, class A3, class A4, class A5, class A6> class list6
434 {
435 public:
436
437     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) {}
438
439     A1 operator[] (boost::arg<1>) const { return a1_; }
440     A2 operator[] (boost::arg<2>) const { return a2_; }
441     A3 operator[] (boost::arg<3>) const { return a3_; }
442     A4 operator[] (boost::arg<4>) const { return a4_; }
443     A5 operator[] (boost::arg<5>) const { return a5_; }
444     A6 operator[] (boost::arg<6>) const { return a6_; }
445
446     A1 operator[] (boost::arg<1> (*) ()) const { return a1_; }
447     A2 operator[] (boost::arg<2> (*) ()) const { return a2_; }
448     A3 operator[] (boost::arg<3> (*) ()) const { return a3_; }
449     A4 operator[] (boost::arg<4> (*) ()) const { return a4_; }
450     A5 operator[] (boost::arg<5> (*) ()) const { return a5_; }
451     A6 operator[] (boost::arg<6> (*) ()) const { return a6_; }
452
453     template<class T> T & operator[] (value<T> & v) const { return v.get(); }
454
455     template<class T> T const & operator[] (value<T> const & v) const { return v.get(); }
456
457     template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
458
459     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); }
460
461     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); }
462
463     template<class R, class F, class A> R operator()(type<R>, F f, A & a) const
464     {
465         return unwrap(f, 0)(a[a1_], a[a2_], a[a3_], a[a4_], a[a5_], a[a6_]);
466     }
467
468     template<class V> void accept(V & v) const
469     {
470         BOOST_BIND_VISIT_EACH(v, a1_, 0);
471         BOOST_BIND_VISIT_EACH(v, a2_, 0);
472         BOOST_BIND_VISIT_EACH(v, a3_, 0);
473         BOOST_BIND_VISIT_EACH(v, a4_, 0);
474         BOOST_BIND_VISIT_EACH(v, a5_, 0);
475         BOOST_BIND_VISIT_EACH(v, a6_, 0);
476     }
477
478 #ifdef BOOST_NO_VOID_RETURNS
479
480     template<class R> struct evaluator
481     {
482         typedef evaluator6<R> type;
483     };
484
485 #else
486
487 private:
488
489 #endif
490
491     A1 a1_;
492     A2 a2_;
493     A3 a3_;
494     A4 a4_;
495     A5 a5_;
496     A6 a6_;
497 };
498
499 template<class A1, class A2, class A3, class A4, class A5, class A6, class A7> class list7
500 {
501 public:
502
503     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) {}
504
505     A1 operator[] (boost::arg<1>) const { return a1_; }
506     A2 operator[] (boost::arg<2>) const { return a2_; }
507     A3 operator[] (boost::arg<3>) const { return a3_; }
508     A4 operator[] (boost::arg<4>) const { return a4_; }
509     A5 operator[] (boost::arg<5>) const { return a5_; }
510     A6 operator[] (boost::arg<6>) const { return a6_; }
511     A7 operator[] (boost::arg<7>) const { return a7_; }
512
513     A1 operator[] (boost::arg<1> (*) ()) const { return a1_; }
514     A2 operator[] (boost::arg<2> (*) ()) const { return a2_; }
515     A3 operator[] (boost::arg<3> (*) ()) const { return a3_; }
516     A4 operator[] (boost::arg<4> (*) ()) const { return a4_; }
517     A5 operator[] (boost::arg<5> (*) ()) const { return a5_; }
518     A6 operator[] (boost::arg<6> (*) ()) const { return a6_; }
519     A7 operator[] (boost::arg<7> (*) ()) const { return a7_; }
520
521     template<class T> T & operator[] (value<T> & v) const { return v.get(); }
522
523     template<class T> T const & operator[] (value<T> const & v) const { return v.get(); }
524
525     template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
526
527     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); }
528
529     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); }
530
531     template<class R, class F, class A> R operator()(type<R>, F f, A & a) const
532     {
533         return unwrap(f, 0)(a[a1_], a[a2_], a[a3_], a[a4_], a[a5_], a[a6_], a[a7_]);
534     }
535
536     template<class V> void accept(V & v) const
537     {
538         BOOST_BIND_VISIT_EACH(v, a1_, 0);
539         BOOST_BIND_VISIT_EACH(v, a2_, 0);
540         BOOST_BIND_VISIT_EACH(v, a3_, 0);
541         BOOST_BIND_VISIT_EACH(v, a4_, 0);
542         BOOST_BIND_VISIT_EACH(v, a5_, 0);
543         BOOST_BIND_VISIT_EACH(v, a6_, 0);
544         BOOST_BIND_VISIT_EACH(v, a7_, 0);
545     }
546
547 #ifdef BOOST_NO_VOID_RETURNS
548
549     template<class R> struct evaluator
550     {
551         typedef evaluator7<R> type;
552     };
553
554 #else
555
556 private:
557
558 #endif
559
560     A1 a1_;
561     A2 a2_;
562     A3 a3_;
563     A4 a4_;
564     A5 a5_;
565     A6 a6_;
566     A7 a7_;
567 };
568
569 template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> class list8
570 {
571 public:
572
573     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) {}
574
575     A1 operator[] (boost::arg<1>) const { return a1_; }
576     A2 operator[] (boost::arg<2>) const { return a2_; }
577     A3 operator[] (boost::arg<3>) const { return a3_; }
578     A4 operator[] (boost::arg<4>) const { return a4_; }
579     A5 operator[] (boost::arg<5>) const { return a5_; }
580     A6 operator[] (boost::arg<6>) const { return a6_; }
581     A7 operator[] (boost::arg<7>) const { return a7_; }
582     A8 operator[] (boost::arg<8>) const { return a8_; }
583
584     A1 operator[] (boost::arg<1> (*) ()) const { return a1_; }
585     A2 operator[] (boost::arg<2> (*) ()) const { return a2_; }
586     A3 operator[] (boost::arg<3> (*) ()) const { return a3_; }
587     A4 operator[] (boost::arg<4> (*) ()) const { return a4_; }
588     A5 operator[] (boost::arg<5> (*) ()) const { return a5_; }
589     A6 operator[] (boost::arg<6> (*) ()) const { return a6_; }
590     A7 operator[] (boost::arg<7> (*) ()) const { return a7_; }
591     A8 operator[] (boost::arg<8> (*) ()) const { return a8_; }
592
593     template<class T> T & operator[] (value<T> & v) const { return v.get(); }
594
595     template<class T> T const & operator[] (value<T> const & v) const { return v.get(); }
596
597     template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
598
599     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); }
600
601     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); }
602
603     template<class R, class F, class A> R operator()(type<R>, F f, A & a) const
604     {
605         return unwrap(f, 0)(a[a1_], a[a2_], a[a3_], a[a4_], a[a5_], a[a6_], a[a7_], a[a8_]);
606     }
607
608     template<class V> void accept(V & v) const
609     {
610         BOOST_BIND_VISIT_EACH(v, a1_, 0);
611         BOOST_BIND_VISIT_EACH(v, a2_, 0);
612         BOOST_BIND_VISIT_EACH(v, a3_, 0);
613         BOOST_BIND_VISIT_EACH(v, a4_, 0);
614         BOOST_BIND_VISIT_EACH(v, a5_, 0);
615         BOOST_BIND_VISIT_EACH(v, a6_, 0);
616         BOOST_BIND_VISIT_EACH(v, a7_, 0);
617         BOOST_BIND_VISIT_EACH(v, a8_, 0);
618     }
619
620 #ifdef BOOST_NO_VOID_RETURNS
621
622     template<class R> struct evaluator
623     {
624         typedef evaluator8<R> type;
625     };
626
627 #else
628
629 private:
630
631 #endif
632
633     A1 a1_;
634     A2 a2_;
635     A3 a3_;
636     A4 a4_;
637     A5 a5_;
638     A6 a6_;
639     A7 a7_;
640     A8 a8_;
641 };
642
643 template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> class list9
644 {
645 public:
646
647     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) {}
648
649     A1 operator[] (boost::arg<1>) const { return a1_; }
650     A2 operator[] (boost::arg<2>) const { return a2_; }
651     A3 operator[] (boost::arg<3>) const { return a3_; }
652     A4 operator[] (boost::arg<4>) const { return a4_; }
653     A5 operator[] (boost::arg<5>) const { return a5_; }
654     A6 operator[] (boost::arg<6>) const { return a6_; }
655     A7 operator[] (boost::arg<7>) const { return a7_; }
656     A8 operator[] (boost::arg<8>) const { return a8_; }
657     A9 operator[] (boost::arg<9>) const { return a9_; }
658
659     A1 operator[] (boost::arg<1> (*) ()) const { return a1_; }
660     A2 operator[] (boost::arg<2> (*) ()) const { return a2_; }
661     A3 operator[] (boost::arg<3> (*) ()) const { return a3_; }
662     A4 operator[] (boost::arg<4> (*) ()) const { return a4_; }
663     A5 operator[] (boost::arg<5> (*) ()) const { return a5_; }
664     A6 operator[] (boost::arg<6> (*) ()) const { return a6_; }
665     A7 operator[] (boost::arg<7> (*) ()) const { return a7_; }
666     A8 operator[] (boost::arg<8> (*) ()) const { return a8_; }
667     A9 operator[] (boost::arg<9> (*) ()) const { return a9_; }
668
669     template<class T> T & operator[] (value<T> & v) const { return v.get(); }
670
671     template<class T> T const & operator[] (value<T> const & v) const { return v.get(); }
672
673     template<class T> T & operator[] (reference_wrapper<T> const & v) const { return v.get(); }
674
675     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); }
676
677     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); }
678
679     template<class R, class F, class A> R operator()(type<R>, F f, A & a) const
680     {
681         return unwrap(f, 0)(a[a1_], a[a2_], a[a3_], a[a4_], a[a5_], a[a6_], a[a7_], a[a8_], a[a9_]);
682     }
683
684     template<class V> void accept(V & v) const
685     {
686         BOOST_BIND_VISIT_EACH(v, a1_, 0);
687         BOOST_BIND_VISIT_EACH(v, a2_, 0);
688         BOOST_BIND_VISIT_EACH(v, a3_, 0);
689         BOOST_BIND_VISIT_EACH(v, a4_, 0);
690         BOOST_BIND_VISIT_EACH(v, a5_, 0);
691         BOOST_BIND_VISIT_EACH(v, a6_, 0);
692         BOOST_BIND_VISIT_EACH(v, a7_, 0);
693         BOOST_BIND_VISIT_EACH(v, a8_, 0);
694         BOOST_BIND_VISIT_EACH(v, a9_, 0);
695     }
696
697 #ifdef BOOST_NO_VOID_RETURNS
698
699     template<class R> struct evaluator
700     {
701         typedef evaluator9<R> type;
702     };
703
704 #else
705
706 private:
707
708 #endif
709
710     A1 a1_;
711     A2 a2_;
712     A3 a3_;
713     A4 a4_;
714     A5 a5_;
715     A6 a6_;
716     A7 a7_;
717     A8 a8_;
718     A9 a9_;
719 };
720
721 #ifdef BOOST_NO_VOID_RETURNS
722
723 template <class R> struct evaluator0
724 {
725     template<class L, class F, class A>
726     static R eval(L const&, F f, A &)
727     {
728         return unwrap(f, 0)();
729     }
730 };
731
732 template <> struct evaluator0<void>
733 {
734     template<class L, class F, class A>
735     static void eval(L const&, F f, A &)
736     {
737         unwrap(f, 0)();
738     }
739 };
740
741 template <class R> struct evaluator1
742 {
743     template<class L, class F, class A>
744     static R eval(L const& l, F f, A & a)
745     {
746         return unwrap(f, 0)(a[l.a1_]);
747     }
748 };
749
750 template <> struct evaluator1<void>
751 {
752     template<class L, class F, class A>
753     static void eval(L const& l, F f, A & a)
754     {
755         unwrap(f, 0)(a[l.a1_]);
756     }
757 };
758
759 template <class R> struct evaluator2
760 {
761     template<class L, class F, class A>
762     static R eval(L const& l, F f, A & a)
763     {
764         return unwrap(f, 0)(a[l.a1_], a[l.a2_]);
765     }
766 };
767
768 template <> struct evaluator2<void>
769 {
770     template<class L, class F, class A>
771     static void eval(L const& l, F f, A & a)
772     {
773         unwrap(f, 0)(a[l.a1_], a[l.a2_]);
774     }
775 };
776
777 template <class R> struct evaluator3
778 {
779     template<class L, class F, class A>
780     static R eval(L const& l, F f, A & a)
781     {
782         return unwrap(f, 0)(a[l.a1_], a[l.a2_], a[l.a3_]);
783     }
784 };
785
786 template <> struct evaluator3<void>
787 {
788     template<class L, class F, class A>
789     static void eval(L const& l, F f, A & a)
790     {
791         unwrap(f, 0)(a[l.a1_], a[l.a2_], a[l.a3_]);
792     }
793 };
794
795 template <class R> struct evaluator4
796 {
797     template<class L, class F, class A>
798     static R eval(L const& l, F f, A & a)
799     {
800         return unwrap(f, 0)(a[l.a1_], a[l.a2_], a[l.a3_], a[l.a4_]);
801     }
802 };
803
804 template <> struct evaluator4<void>
805 {
806     template<class L, class F, class A>
807     static void eval(L const& l, F f, A & a)
808     {
809         unwrap(f, 0)(a[l.a1_], a[l.a2_], a[l.a3_], a[l.a4_]);
810     }
811 };
812
813 template <class R> struct evaluator5
814 {
815     template<class L, class F, class A>
816     static R eval(L const& l, F f, A & a)
817     {
818         return unwrap(f, 0)(a[l.a1_], a[l.a2_], a[l.a3_], a[l.a4_], a[l.a5_]);
819     }
820 };
821
822 template <> struct evaluator5<void>
823 {
824     template<class L, class F, class A>
825     static void eval(L const& l, F f, A & a)
826     {
827         unwrap(f, 0)(a[l.a1_], a[l.a2_], a[l.a3_], a[l.a4_], a[l.a5_]);
828     }
829 };
830
831 template <class R> struct evaluator6
832 {
833     template<class L, class F, class A>
834     static R eval(L const& l, F f, A & a)
835     {
836         return unwrap(f, 0)(a[l.a1_], a[l.a2_], a[l.a3_], a[l.a4_], a[l.a5_], a[l.a6_]);
837     }
838 };
839
840 template <> struct evaluator6<void>
841 {
842     template<class L, class F, class A>
843     static void eval(L const& l, F f, A & a)
844     {
845         unwrap(f, 0)(a[l.a1_], a[l.a2_], a[l.a3_], a[l.a4_], a[l.a5_], a[l.a6_]);
846     }
847 };
848
849 template <class R> struct evaluator7
850 {
851     template<class L, class F, class A>
852     static R eval(L const& l, F f, A & a)
853     {
854         return unwrap(f, 0)(a[l.a1_], a[l.a2_], a[l.a3_], a[l.a4_], a[l.a5_], a[l.a6_], a[l.a7_]);
855     }
856 };
857
858 template <> struct evaluator7<void>
859 {
860     template<class L, class F, class A>
861     static void eval(L const& l, F f, A & a)
862     {
863         unwrap(f, 0)(a[l.a1_], a[l.a2_], a[l.a3_], a[l.a4_], a[l.a5_], a[l.a6_], a[l.a7_]);
864     }
865 };
866
867 template <class R> struct evaluator8
868 {
869     template<class L, class F, class A>
870     static R eval(L const& l, F f, A & a)
871     {
872         return unwrap(f, 0)(a[l.a1_], a[l.a2_], a[l.a3_], a[l.a4_], a[l.a5_], a[l.a6_], a[l.a7_], a[l.a8_]);
873     }
874 };
875
876 template <> struct evaluator8<void>
877 {
878     template<class L, class F, class A>
879     static void eval(L const& l, F f, A & a)
880     {
881         unwrap(f, 0)(a[l.a1_], a[l.a2_], a[l.a3_], a[l.a4_], a[l.a5_], a[l.a6_], a[l.a7_], a[l.a8_]);
882     }
883 };
884
885 template <class R> struct evaluator9
886 {
887     template<class L, class F, class A>
888     static R eval(L const& l, F f, A & a)
889     {
890         return unwrap(f, 0)(a[l.a1_], a[l.a2_], a[l.a3_], a[l.a4_], a[l.a5_], a[l.a6_], a[l.a7_], a[l.a8_], a[l.a9_]);
891     }
892 };
893
894 template <> struct evaluator9<void>
895 {
896     template<class L, class F, class A>
897     static void eval(L const& l, F f, A & a)
898     {
899         unwrap(f, 0)(a[l.a1_], a[l.a2_], a[l.a3_], a[l.a4_], a[l.a5_], a[l.a6_], a[l.a7_], a[l.a8_], a[l.a9_]);
900     }
901 };
902
903 #endif
904
905 // bind_t
906
907 #ifndef BOOST_NO_VOID_RETURNS
908
909 template<class R, class F, class L> class bind_t
910 {
911 public:
912
913     bind_t(F f, L const & l): f_(f), l_(l) {}
914
915 #define BOOST_BIND_EVALUATE return l_(type<result_type>(), f_, a)
916 #include <boost/bind/bind_template.hpp>
917 #undef BOOST_BIND_EVALUATE
918
919 };
920
921 #else
922
923 template<class R> struct bind_t_generator
924 {
925
926 template<class F, class L> class implementation
927 {
928 public:
929
930     implementation(F f, L const & l): f_(f), l_(l) {}
931
932 #define BOOST_BIND_EVALUATE return L::BOOST_NESTED_TEMPLATE evaluator<result_type>::type::eval(l_, f_, a);
933 #include <boost/bind/bind_template.hpp>
934 #undef BOOST_BIND_EVALUATE
935
936 };
937
938 };
939
940 template<> struct bind_t_generator<void>
941 {
942
943 template<class F, class L> class implementation
944 {
945 private:
946
947     typedef void R;
948
949 public:
950
951     implementation(F f, L const & l): f_(f), l_(l) {}
952
953 #define BOOST_BIND_EVALUATE L::BOOST_NESTED_TEMPLATE evaluator<result_type>::type::eval(l_, f_, a);
954 #include <boost/bind/bind_template.hpp>
955 #undef BOOST_BIND_EVALUATE
956
957 };
958
959 };
960
961 template<class R2, class F, class L> class bind_t: public bind_t_generator<R2>::BOOST_NESTED_TEMPLATE implementation<F, L>
962 {
963 public:
964
965     bind_t(F f, L const & l): bind_t_generator<R2>::BOOST_NESTED_TEMPLATE implementation<F, L>(f, l) {}
966
967 };
968
969 #endif
970
971 // add_value
972
973 #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) || (__SUNPRO_CC >= 0x530)
974
975 template<class T> struct add_value
976 {
977     typedef value<T> type;
978 };
979
980 template<class T> struct add_value< value<T> >
981 {
982     typedef value<T> type;
983 };
984
985 template<class T> struct add_value< reference_wrapper<T> >
986 {
987     typedef reference_wrapper<T> type;
988 };
989
990 template<int I> struct add_value< arg<I> >
991 {
992     typedef boost::arg<I> type;
993 };
994
995 template<int I> struct add_value< arg<I> (*) () >
996 {
997     typedef boost::arg<I> (*type) ();
998 };
999
1000 template<class R, class F, class L> struct add_value< bind_t<R, F, L> >
1001 {
1002     typedef bind_t<R, F, L> type;
1003 };
1004
1005 #else
1006
1007 template<int I> struct _avt_0;
1008
1009 template<> struct _avt_0<1>
1010 {
1011     template<class T> struct inner
1012     {
1013         typedef T type;
1014     };
1015 };
1016
1017 template<> struct _avt_0<2>
1018 {
1019     template<class T> struct inner
1020     {
1021         typedef value<T> type;
1022     };
1023 };
1024
1025 typedef char (&_avt_r1) [1];
1026 typedef char (&_avt_r2) [2];
1027
1028 template<class T> _avt_r1 _avt_f(value<T>);
1029 template<class T> _avt_r1 _avt_f(reference_wrapper<T>);
1030 template<int I> _avt_r1 _avt_f(arg<I>);
1031 template<int I> _avt_r1 _avt_f(arg<I> (*) ());
1032 template<class R, class F, class L> _avt_r1 _avt_f(bind_t<R, F, L>);
1033
1034 _avt_r2 _avt_f(...);
1035
1036 template<class T> struct add_value
1037 {
1038     static T t();
1039     typedef typename _avt_0<sizeof(_avt_f(t()))>::template inner<T>::type type;
1040 };
1041
1042 #endif
1043
1044 // list_av_N
1045
1046 template<class A1> struct list_av_1
1047 {
1048     typedef typename add_value<A1>::type B1;
1049     typedef list1<B1> type;
1050 };
1051
1052 template<class A1, class A2> struct list_av_2
1053 {
1054     typedef typename add_value<A1>::type B1;
1055     typedef typename add_value<A2>::type B2;
1056     typedef list2<B1, B2> type;
1057 };
1058
1059 template<class A1, class A2, class A3> struct list_av_3
1060 {
1061     typedef typename add_value<A1>::type B1;
1062     typedef typename add_value<A2>::type B2;
1063     typedef typename add_value<A3>::type B3;
1064     typedef list3<B1, B2, B3> type;
1065 };
1066
1067 template<class A1, class A2, class A3, class A4> struct list_av_4
1068 {
1069     typedef typename add_value<A1>::type B1;
1070     typedef typename add_value<A2>::type B2;
1071     typedef typename add_value<A3>::type B3;
1072     typedef typename add_value<A4>::type B4;
1073     typedef list4<B1, B2, B3, B4> type;
1074 };
1075
1076 template<class A1, class A2, class A3, class A4, class A5> struct list_av_5
1077 {
1078     typedef typename add_value<A1>::type B1;
1079     typedef typename add_value<A2>::type B2;
1080     typedef typename add_value<A3>::type B3;
1081     typedef typename add_value<A4>::type B4;
1082     typedef typename add_value<A5>::type B5;
1083     typedef list5<B1, B2, B3, B4, B5> type;
1084 };
1085
1086 template<class A1, class A2, class A3, class A4, class A5, class A6> struct list_av_6
1087 {
1088     typedef typename add_value<A1>::type B1;
1089     typedef typename add_value<A2>::type B2;
1090     typedef typename add_value<A3>::type B3;
1091     typedef typename add_value<A4>::type B4;
1092     typedef typename add_value<A5>::type B5;
1093     typedef typename add_value<A6>::type B6;
1094     typedef list6<B1, B2, B3, B4, B5, B6> type;
1095 };
1096
1097 template<class A1, class A2, class A3, class A4, class A5, class A6, class A7> struct list_av_7
1098 {
1099     typedef typename add_value<A1>::type B1;
1100     typedef typename add_value<A2>::type B2;
1101     typedef typename add_value<A3>::type B3;
1102     typedef typename add_value<A4>::type B4;
1103     typedef typename add_value<A5>::type B5;
1104     typedef typename add_value<A6>::type B6;
1105     typedef typename add_value<A7>::type B7;
1106     typedef list7<B1, B2, B3, B4, B5, B6, B7> type;
1107 };
1108
1109 template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8> struct list_av_8
1110 {
1111     typedef typename add_value<A1>::type B1;
1112     typedef typename add_value<A2>::type B2;
1113     typedef typename add_value<A3>::type B3;
1114     typedef typename add_value<A4>::type B4;
1115     typedef typename add_value<A5>::type B5;
1116     typedef typename add_value<A6>::type B6;
1117     typedef typename add_value<A7>::type B7;
1118     typedef typename add_value<A8>::type B8;
1119     typedef list8<B1, B2, B3, B4, B5, B6, B7, B8> type;
1120 };
1121
1122 template<class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9> struct list_av_9
1123 {
1124     typedef typename add_value<A1>::type B1;
1125     typedef typename add_value<A2>::type B2;
1126     typedef typename add_value<A3>::type B3;
1127     typedef typename add_value<A4>::type B4;
1128     typedef typename add_value<A5>::type B5;
1129     typedef typename add_value<A6>::type B6;
1130     typedef typename add_value<A7>::type B7;
1131     typedef typename add_value<A8>::type B8;
1132     typedef typename add_value<A9>::type B9;
1133     typedef list9<B1, B2, B3, B4, B5, B6, B7, B8, B9> type;
1134 };
1135
1136 } // namespace _bi
1137
1138 // visit_each
1139
1140 template<class V, class T> void visit_each(V & v, _bi::value<T> const & t, int)
1141 {
1142     BOOST_BIND_VISIT_EACH(v, t.get(), 0);
1143 }
1144
1145 template<class V, class R, class F, class L> void visit_each(V & v, _bi::bind_t<R, F, L> const & t, int)
1146 {
1147     t.accept(v);
1148 }
1149
1150 // bind
1151
1152 #ifndef BOOST_BIND
1153 #define BOOST_BIND bind
1154 #endif
1155
1156 // generic function objects
1157
1158 template<class R, class F>
1159     _bi::bind_t<R, F, _bi::list0>
1160     BOOST_BIND(F f)
1161 {
1162     typedef _bi::list0 list_type;
1163     return _bi::bind_t<R, F, list_type> (f, list_type());
1164 }
1165
1166 template<class R, class F, class A1>
1167     _bi::bind_t<R, F, typename _bi::list_av_1<A1>::type>
1168     BOOST_BIND(F f, A1 a1)
1169 {
1170     typedef typename _bi::list_av_1<A1>::type list_type;
1171     return _bi::bind_t<R, F, list_type> (f, list_type(a1));
1172 }
1173
1174 template<class R, class F, class A1, class A2>
1175     _bi::bind_t<R, F, typename _bi::list_av_2<A1, A2>::type>
1176     BOOST_BIND(F f, A1 a1, A2 a2)
1177 {
1178     typedef typename _bi::list_av_2<A1, A2>::type list_type;
1179     return _bi::bind_t<R, F, list_type> (f, list_type(a1, a2));
1180 }
1181
1182 template<class R, class F, class A1, class A2, class A3>
1183     _bi::bind_t<R, F, typename _bi::list_av_3<A1, A2, A3>::type>
1184     BOOST_BIND(F f, A1 a1, A2 a2, A3 a3)
1185 {
1186     typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
1187     return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3));
1188 }
1189
1190 template<class R, class F, class A1, class A2, class A3, class A4>
1191     _bi::bind_t<R, F, typename _bi::list_av_4<A1, A2, A3, A4>::type>
1192     BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4)
1193 {
1194     typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
1195     return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4));
1196 }
1197
1198 template<class R, class F, class A1, class A2, class A3, class A4, class A5>
1199     _bi::bind_t<R, F, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
1200     BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
1201 {
1202     typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
1203     return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5));
1204 }
1205
1206 template<class R, class F, class A1, class A2, class A3, class A4, class A5, class A6>
1207     _bi::bind_t<R, F, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
1208     BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
1209 {
1210     typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
1211     return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6));
1212 }
1213
1214 template<class R, class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7>
1215     _bi::bind_t<R, F, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
1216     BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
1217 {
1218     typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
1219     return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7));
1220 }
1221
1222 template<class R, class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
1223     _bi::bind_t<R, F, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
1224     BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
1225 {
1226     typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
1227     return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8));
1228 }
1229
1230 template<class R, class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
1231     _bi::bind_t<R, F, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
1232     BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
1233 {
1234     typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
1235     return _bi::bind_t<R, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9));
1236 }
1237
1238 #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
1239
1240 // adaptable function objects
1241
1242 template<class F>
1243     _bi::bind_t<_bi::unspecified, F, _bi::list0>
1244     BOOST_BIND(F f)
1245 {
1246     typedef _bi::list0 list_type;
1247     return _bi::bind_t<_bi::unspecified, F, list_type> (f, list_type());
1248 }
1249
1250 template<class F, class A1>
1251     _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_1<A1>::type>
1252     BOOST_BIND(F f, A1 a1)
1253 {
1254     typedef typename _bi::list_av_1<A1>::type list_type;
1255     return _bi::bind_t<_bi::unspecified, F, list_type> (f, list_type(a1));
1256 }
1257
1258 template<class F, class A1, class A2>
1259     _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_2<A1, A2>::type>
1260     BOOST_BIND(F f, A1 a1, A2 a2)
1261 {
1262     typedef typename _bi::list_av_2<A1, A2>::type list_type;
1263     return _bi::bind_t<_bi::unspecified, F, list_type> (f, list_type(a1, a2));
1264 }
1265
1266 template<class F, class A1, class A2, class A3>
1267     _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_3<A1, A2, A3>::type>
1268     BOOST_BIND(F f, A1 a1, A2 a2, A3 a3)
1269 {
1270     typedef typename _bi::list_av_3<A1, A2, A3>::type list_type;
1271     return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3));
1272 }
1273
1274 template<class F, class A1, class A2, class A3, class A4>
1275     _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_4<A1, A2, A3, A4>::type>
1276     BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4)
1277 {
1278     typedef typename _bi::list_av_4<A1, A2, A3, A4>::type list_type;
1279     return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4));
1280 }
1281
1282 template<class F, class A1, class A2, class A3, class A4, class A5>
1283     _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_5<A1, A2, A3, A4, A5>::type>
1284     BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
1285 {
1286     typedef typename _bi::list_av_5<A1, A2, A3, A4, A5>::type list_type;
1287     return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5));
1288 }
1289
1290 template<class F, class A1, class A2, class A3, class A4, class A5, class A6>
1291     _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type>
1292     BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6)
1293 {
1294     typedef typename _bi::list_av_6<A1, A2, A3, A4, A5, A6>::type list_type;
1295     return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6));
1296 }
1297
1298 template<class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7>
1299     _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type>
1300     BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7)
1301 {
1302     typedef typename _bi::list_av_7<A1, A2, A3, A4, A5, A6, A7>::type list_type;
1303     return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7));
1304 }
1305
1306 template<class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8>
1307     _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type>
1308     BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8)
1309 {
1310     typedef typename _bi::list_av_8<A1, A2, A3, A4, A5, A6, A7, A8>::type list_type;
1311     return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8));
1312 }
1313
1314 template<class F, class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9>
1315     _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type>
1316     BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9)
1317 {
1318     typedef typename _bi::list_av_9<A1, A2, A3, A4, A5, A6, A7, A8, A9>::type list_type;
1319     return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9));
1320 }
1321
1322 #endif // !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
1323
1324 // function pointers
1325
1326 #define BOOST_BIND_CC
1327 #define BOOST_BIND_ST
1328
1329 #include <boost/bind/bind_cc.hpp>
1330
1331 #undef BOOST_BIND_CC
1332 #undef BOOST_BIND_ST
1333
1334 #ifdef BOOST_BIND_ENABLE_STDCALL
1335
1336 #define BOOST_BIND_CC __stdcall
1337 #define BOOST_BIND_ST
1338
1339 #include <boost/bind/bind_cc.hpp>
1340
1341 #undef BOOST_BIND_CC
1342 #undef BOOST_BIND_ST
1343
1344 #endif
1345
1346 #ifdef BOOST_BIND_ENABLE_FASTCALL
1347
1348 #define BOOST_BIND_CC __fastcall
1349 #define BOOST_BIND_ST
1350
1351 #include <boost/bind/bind_cc.hpp>
1352
1353 #undef BOOST_BIND_CC
1354 #undef BOOST_BIND_ST
1355
1356 #endif
1357
1358 #ifdef BOOST_BIND_ENABLE_PASCAL
1359
1360 #define BOOST_BIND_ST pascal
1361 #define BOOST_BIND_CC
1362
1363 #include <boost/bind/bind_cc.hpp>
1364
1365 #undef BOOST_BIND_ST
1366 #undef BOOST_BIND_CC
1367
1368 #endif
1369
1370 // member function pointers
1371
1372 #define BOOST_BIND_MF_NAME(X) X
1373 #define BOOST_BIND_MF_CC
1374
1375 #include <boost/bind/bind_mf_cc.hpp>
1376
1377 #undef BOOST_BIND_MF_NAME
1378 #undef BOOST_BIND_MF_CC
1379
1380 #ifdef BOOST_MEM_FN_ENABLE_STDCALL
1381
1382 #define BOOST_BIND_MF_NAME(X) X##_stdcall
1383 #define BOOST_BIND_MF_CC __stdcall
1384
1385 #include <boost/bind/bind_mf_cc.hpp>
1386
1387 #undef BOOST_BIND_MF_NAME
1388 #undef BOOST_BIND_MF_CC
1389
1390 #endif
1391
1392 #ifdef BOOST_MEM_FN_ENABLE_FASTCALL
1393
1394 #define BOOST_BIND_MF_NAME(X) X##_fastcall
1395 #define BOOST_BIND_MF_CC __fastcall
1396
1397 #include <boost/bind/bind_mf_cc.hpp>
1398
1399 #undef BOOST_BIND_MF_NAME
1400 #undef BOOST_BIND_MF_CC
1401
1402 #endif
1403
1404 // data member pointers
1405
1406 template<class R, class T, class A1>
1407     _bi::bind_t< R const &, _mfi::dm<R, T>, typename _bi::list_av_1<A1>::type >
1408     BOOST_BIND(R T::*f, A1 a1)
1409 {
1410     typedef _mfi::dm<R, T> F;
1411     typedef typename _bi::list_av_1<A1>::type list_type;
1412     return _bi::bind_t<R const &, F, list_type>(F(f), list_type(a1));
1413 }
1414
1415 } // namespace boost
1416
1417 #ifndef BOOST_BIND_NO_PLACEHOLDERS
1418
1419 # include <boost/bind/placeholders.hpp>
1420
1421 #endif
1422
1423 #ifdef BOOST_MSVC
1424 # pragma warning(default: 4512) // assignment operator could not be generated
1425 # pragma warning(pop)
1426 #endif
1427
1428 #endif // #ifndef BOOST_BIND_HPP_INCLUDED