#ifndef BOOST_BIND_HPP_INCLUDED #define BOOST_BIND_HPP_INCLUDED #if _MSC_VER >= 1020 #pragma once #endif // // bind.hpp - binds function objects to arguments // // Copyright (c) 2001 Peter Dimov and Multi Media Ltd. // Copyright (c) 2001 David Abrahams // // Permission to copy, use, modify, sell and distribute this software // is granted provided this copyright notice appears in all copies. // This software is provided "as is" without express or implied // warranty, and with no claim as to its suitability for any purpose. // // See http://www.boost.org/libs/bind/bind.html for documentation. // #include #include #include namespace boost { namespace _bi // implementation details { // result_traits template struct result_traits { typedef R type; }; #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) struct unspecified {}; template struct result_traits { typedef typename F::result_type type; }; #endif // bind_t forward declaration for listN template class bind_t; // value template class value { public: value(T const & t): t_(t) {} T & get() { return t_; } T const & get() const { return t_; } private: T t_; value & operator= (value const &); }; // arg template class arg {}; // type template class type {}; // listN #ifdef BOOST_NO_VOID_RETURNS template struct evaluator0; template struct evaluator1; template struct evaluator2; template struct evaluator3; template struct evaluator4; template struct evaluator5; template struct evaluator6; template struct evaluator7; template struct evaluator8; template struct evaluator9; #endif class list0 { public: list0() {} template T & operator[] (value & v) const { return v.get(); } template T const & operator[] (value const & v) const { return v.get(); } template T & operator[] (reference_wrapper const & v) const { return v.get(); } template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } template R operator()(type, F f, A &) const { return f(); } template void accept(V &) const { } #ifdef BOOST_NO_VOID_RETURNS template struct evaluator { typedef evaluator0 type; }; #endif private: list0 & operator= (list0 const &); }; template class list1 { public: explicit list1(A1 a1): a1_(a1) {} A1 operator[] (arg<1>) const { return a1_; } template T & operator[] (value & v) const { return v.get(); } template T const & operator[] (value const & v) const { return v.get(); } template T & operator[] (reference_wrapper const & v) const { return v.get(); } template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } template R operator()(type, F f, A & a) const { return f(a[a1_]); } template void accept(V & v) const { v(a1_); } #ifdef BOOST_NO_VOID_RETURNS template struct evaluator { typedef evaluator1 type; }; #else private: #endif A1 a1_; private: list1 & operator= (list1 const &); }; template class list2 { public: list2(A1 a1, A2 a2): a1_(a1), a2_(a2) {} A1 operator[] (arg<1>) const { return a1_; } A2 operator[] (arg<2>) const { return a2_; } template T & operator[] (value & v) const { return v.get(); } template T const & operator[] (value const & v) const { return v.get(); } template T & operator[] (reference_wrapper const & v) const { return v.get(); } template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } template R operator()(type, F f, A & a) const { return f(a[a1_], a[a2_]); } template void accept(V & v) const { v(a1_); v(a2_); } #ifdef BOOST_NO_VOID_RETURNS template struct evaluator { typedef evaluator2 type; }; #else private: #endif A1 a1_; A2 a2_; private: list2 & operator= (list2 const &); }; template class list3 { public: list3(A1 a1, A2 a2, A3 a3): a1_(a1), a2_(a2), a3_(a3) {} A1 operator[] (arg<1>) const { return a1_; } A2 operator[] (arg<2>) const { return a2_; } A3 operator[] (arg<3>) const { return a3_; } template T & operator[] (value & v) const { return v.get(); } template T const & operator[] (value const & v) const { return v.get(); } template T & operator[] (reference_wrapper const & v) const { return v.get(); } template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } template R operator()(type, F f, A & a) const { return f(a[a1_], a[a2_], a[a3_]); } template void accept(V & v) const { v(a1_); v(a2_); v(a3_); } #ifdef BOOST_NO_VOID_RETURNS template struct evaluator { typedef evaluator3 type; }; #else private: #endif A1 a1_; A2 a2_; A3 a3_; private: list3 & operator= (list3 const &); }; template class list4 { public: list4(A1 a1, A2 a2, A3 a3, A4 a4): a1_(a1), a2_(a2), a3_(a3), a4_(a4) {} A1 operator[] (arg<1>) const { return a1_; } A2 operator[] (arg<2>) const { return a2_; } A3 operator[] (arg<3>) const { return a3_; } A4 operator[] (arg<4>) const { return a4_; } template T & operator[] (value & v) const { return v.get(); } template T const & operator[] (value const & v) const { return v.get(); } template T & operator[] (reference_wrapper const & v) const { return v.get(); } template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } template R operator()(type, F f, A & a) const { return f(a[a1_], a[a2_], a[a3_], a[a4_]); } template void accept(V & v) const { v(a1_); v(a2_); v(a3_); v(a4_); } #ifdef BOOST_NO_VOID_RETURNS template struct evaluator { typedef evaluator4 type; }; #else private: #endif A1 a1_; A2 a2_; A3 a3_; A4 a4_; private: list4 & operator= (list4 const &); }; template class list5 { public: list5(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5): a1_(a1), a2_(a2), a3_(a3), a4_(a4), a5_(a5) {} A1 operator[] (arg<1>) const { return a1_; } A2 operator[] (arg<2>) const { return a2_; } A3 operator[] (arg<3>) const { return a3_; } A4 operator[] (arg<4>) const { return a4_; } A5 operator[] (arg<5>) const { return a5_; } template T & operator[] (value & v) const { return v.get(); } template T const & operator[] (value const & v) const { return v.get(); } template T & operator[] (reference_wrapper const & v) const { return v.get(); } template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } template R operator()(type, F f, A & a) const { return f(a[a1_], a[a2_], a[a3_], a[a4_], a[a5_]); } template void accept(V & v) const { v(a1_); v(a2_); v(a3_); v(a4_); v(a5_); } #ifdef BOOST_NO_VOID_RETURNS template struct evaluator { typedef evaluator5 type; }; #else private: #endif A1 a1_; A2 a2_; A3 a3_; A4 a4_; A5 a5_; private: list5 & operator= (list5 const &); }; template class list6 { public: 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) {} A1 operator[] (arg<1>) const { return a1_; } A2 operator[] (arg<2>) const { return a2_; } A3 operator[] (arg<3>) const { return a3_; } A4 operator[] (arg<4>) const { return a4_; } A5 operator[] (arg<5>) const { return a5_; } A6 operator[] (arg<6>) const { return a6_; } template T & operator[] (value & v) const { return v.get(); } template T const & operator[] (value const & v) const { return v.get(); } template T & operator[] (reference_wrapper const & v) const { return v.get(); } template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } template R operator()(type, F f, A & a) const { return f(a[a1_], a[a2_], a[a3_], a[a4_], a[a5_], a[a6_]); } template void accept(V & v) const { v(a1_); v(a2_); v(a3_); v(a4_); v(a5_); v(a6_); } #ifdef BOOST_NO_VOID_RETURNS template struct evaluator { typedef evaluator6 type; }; #else private: #endif A1 a1_; A2 a2_; A3 a3_; A4 a4_; A5 a5_; A6 a6_; private: list6 & operator= (list6 const &); }; template class list7 { public: 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) {} A1 operator[] (arg<1>) const { return a1_; } A2 operator[] (arg<2>) const { return a2_; } A3 operator[] (arg<3>) const { return a3_; } A4 operator[] (arg<4>) const { return a4_; } A5 operator[] (arg<5>) const { return a5_; } A6 operator[] (arg<6>) const { return a6_; } A7 operator[] (arg<7>) const { return a7_; } template T & operator[] (value & v) const { return v.get(); } template T const & operator[] (value const & v) const { return v.get(); } template T & operator[] (reference_wrapper const & v) const { return v.get(); } template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } template R operator()(type, F f, A & a) const { return f(a[a1_], a[a2_], a[a3_], a[a4_], a[a5_], a[a6_], a[a7_]); } template void accept(V & v) const { v(a1_); v(a2_); v(a3_); v(a4_); v(a5_); v(a6_); v(a7_); } #ifdef BOOST_NO_VOID_RETURNS template struct evaluator { typedef evaluator7 type; }; #else private: #endif A1 a1_; A2 a2_; A3 a3_; A4 a4_; A5 a5_; A6 a6_; A7 a7_; private: list7 & operator= (list7 const &); }; template class list8 { public: 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) {} A1 operator[] (arg<1>) const { return a1_; } A2 operator[] (arg<2>) const { return a2_; } A3 operator[] (arg<3>) const { return a3_; } A4 operator[] (arg<4>) const { return a4_; } A5 operator[] (arg<5>) const { return a5_; } A6 operator[] (arg<6>) const { return a6_; } A7 operator[] (arg<7>) const { return a7_; } A8 operator[] (arg<8>) const { return a8_; } template T & operator[] (value & v) const { return v.get(); } template T const & operator[] (value const & v) const { return v.get(); } template T & operator[] (reference_wrapper const & v) const { return v.get(); } template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } template R operator()(type, F f, A & a) const { return f(a[a1_], a[a2_], a[a3_], a[a4_], a[a5_], a[a6_], a[a7_], a[a8_]); } template void accept(V & v) const { v(a1_); v(a2_); v(a3_); v(a4_); v(a5_); v(a6_); v(a7_); v(a8_); } #ifdef BOOST_NO_VOID_RETURNS template struct evaluator { typedef evaluator8 type; }; #else private: #endif A1 a1_; A2 a2_; A3 a3_; A4 a4_; A5 a5_; A6 a6_; A7 a7_; A8 a8_; private: list8 & operator= (list8 const &); }; template class list9 { public: 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) {} A1 operator[] (arg<1>) const { return a1_; } A2 operator[] (arg<2>) const { return a2_; } A3 operator[] (arg<3>) const { return a3_; } A4 operator[] (arg<4>) const { return a4_; } A5 operator[] (arg<5>) const { return a5_; } A6 operator[] (arg<6>) const { return a6_; } A7 operator[] (arg<7>) const { return a7_; } A8 operator[] (arg<8>) const { return a8_; } A9 operator[] (arg<9>) const { return a9_; } template T & operator[] (value & v) const { return v.get(); } template T const & operator[] (value const & v) const { return v.get(); } template T & operator[] (reference_wrapper const & v) const { return v.get(); } template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } template R operator()(type, F f, A & a) const { return f(a[a1_], a[a2_], a[a3_], a[a4_], a[a5_], a[a6_], a[a7_], a[a8_], a[a9_]); } template void accept(V & v) const { v(a1_); v(a2_); v(a3_); v(a4_); v(a5_); v(a6_); v(a7_); v(a8_); v(a9_); } #ifdef BOOST_NO_VOID_RETURNS template struct evaluator { typedef evaluator9 type; }; #else private: #endif A1 a1_; A2 a2_; A3 a3_; A4 a4_; A5 a5_; A6 a6_; A7 a7_; A8 a8_; A9 a9_; private: list9 & operator= (list9 const &); }; #ifdef BOOST_NO_VOID_RETURNS template struct evaluator0 { template static R eval(L const&, F f, A &) { return f(); } }; template <> struct evaluator0 { template static void eval(L const&, F f, A &) { f(); } }; template struct evaluator1 { template static R eval(L const& l, F f, A & a) { return f(a[l.a1_]); } }; template <> struct evaluator1 { template static void eval(L const& l, F f, A & a) { f(a[l.a1_]); } }; template struct evaluator2 { template static R eval(L const& l, F f, A & a) { return f(a[l.a1_], a[l.a2_]); } }; template <> struct evaluator2 { template static void eval(L const& l, F f, A & a) { f(a[l.a1_], a[l.a2_]); } }; template struct evaluator3 { template static R eval(L const& l, F f, A & a) { return f(a[l.a1_], a[l.a2_], a[l.a3_]); } }; template <> struct evaluator3 { template static void eval(L const& l, F f, A & a) { f(a[l.a1_], a[l.a2_], a[l.a3_]); } }; template struct evaluator4 { template static R eval(L const& l, F f, A & a) { return f(a[l.a1_], a[l.a2_], a[l.a3_], a[l.a4_]); } }; template <> struct evaluator4 { template static void eval(L const& l, F f, A & a) { f(a[l.a1_], a[l.a2_], a[l.a3_], a[l.a4_]); } }; template struct evaluator5 { template static R eval(L const& l, F f, A & a) { return f(a[l.a1_], a[l.a2_], a[l.a3_], a[l.a4_], a[l.a5_]); } }; template <> struct evaluator5 { template static void eval(L const& l, F f, A & a) { f(a[l.a1_], a[l.a2_], a[l.a3_], a[l.a4_], a[l.a5_]); } }; template struct evaluator6 { template static R eval(L const& l, F f, A & a) { return f(a[l.a1_], a[l.a2_], a[l.a3_], a[l.a4_], a[l.a5_], a[l.a6_]); } }; template <> struct evaluator6 { template static void eval(L const& l, F f, A & a) { f(a[l.a1_], a[l.a2_], a[l.a3_], a[l.a4_], a[l.a5_], a[l.a6_]); } }; template struct evaluator7 { template static R eval(L const& l, F f, A & a) { return f(a[l.a1_], a[l.a2_], a[l.a3_], a[l.a4_], a[l.a5_], a[l.a6_], a[l.a7_]); } }; template <> struct evaluator7 { template static void eval(L const& l, F f, A & a) { f(a[l.a1_], a[l.a2_], a[l.a3_], a[l.a4_], a[l.a5_], a[l.a6_], a[l.a7_]); } }; template struct evaluator8 { template static R eval(L const& l, F f, A & a) { return f(a[l.a1_], a[l.a2_], a[l.a3_], a[l.a4_], a[l.a5_], a[l.a6_], a[l.a7_], a[l.a8_]); } }; template <> struct evaluator8 { template static void eval(L const& l, F f, A & a) { f(a[l.a1_], a[l.a2_], a[l.a3_], a[l.a4_], a[l.a5_], a[l.a6_], a[l.a7_], a[l.a8_]); } }; template struct evaluator9 { template static R eval(L const& l, F f, A & a) { return f(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_]); } }; template <> struct evaluator9 { template static void eval(L const& l, F f, A & a) { f(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_]); } }; #endif // bind_t #ifndef BOOST_NO_VOID_RETURNS template class bind_t { public: bind_t(F f, L const & l): f_(f), l_(l) {} #define BOOST_BIND_EVALUATE return l_(type(), f_, a) #include #undef BOOST_BIND_EVALUATE private: bind_t & operator= (bind_t const &); }; #else template struct bind_t_generator { template class implementation { public: implementation(F f, L const & l): f_(f), l_(l) {} #define BOOST_BIND_EVALUATE return L::BOOST_NESTED_TEMPLATE evaluator::type::eval(l_, f_, a); #include #undef BOOST_BIND_EVALUATE private: implementation & operator= (implementation const &); }; }; template<> struct bind_t_generator { template class implementation { public: implementation(F f, L const & l): f_(f), l_(l) {} #define BOOST_BIND_EVALUATE L::BOOST_NESTED_TEMPLATE evaluator::type::eval(l_, f_, a); #include #undef BOOST_BIND_EVALUATE private: implementation & operator= (implementation const &); }; }; #if defined(BOOST_MSVC) && (BOOST_MSVC < 1300) #pragma warning(push) #pragma warning(disable: 4097) // typedef name 'base' used as a synonym for class #endif template class bind_t: public bind_t_generator::BOOST_NESTED_TEMPLATE implementation { private: typedef typename bind_t_generator::template implementation base; public: bind_t(F f, L const & l): base(f, l) {} private: bind_t & operator= (bind_t const &); }; #if defined(BOOST_MSVC) && (BOOST_MSVC < 1300) #pragma warning(pop) #endif #endif // add_value #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) || (__SUNPRO_CC >= 0x530) template struct add_value { typedef value type; }; template struct add_value< value > { typedef value type; }; template struct add_value< reference_wrapper > { typedef reference_wrapper type; }; template struct add_value< arg > { typedef arg type; }; template struct add_value< bind_t > { typedef bind_t type; }; #else template struct _avt_0; template<> struct _avt_0<1> { template struct inner { typedef T type; }; }; template<> struct _avt_0<2> { template struct inner { typedef value type; }; }; typedef char (&_avt_r1) [1]; typedef char (&_avt_r2) [2]; template _avt_r1 _avt_f(value); template _avt_r1 _avt_f(reference_wrapper); template _avt_r1 _avt_f(arg); template _avt_r1 _avt_f(bind_t); _avt_r2 _avt_f(...); template struct add_value { static T t(); typedef typename _avt_0::template inner::type type; }; #endif // list_av_N template struct list_av_1 { typedef typename add_value::type B1; typedef list1 type; }; template struct list_av_2 { typedef typename add_value::type B1; typedef typename add_value::type B2; typedef list2 type; }; template struct list_av_3 { typedef typename add_value::type B1; typedef typename add_value::type B2; typedef typename add_value::type B3; typedef list3 type; }; template struct list_av_4 { typedef typename add_value::type B1; typedef typename add_value::type B2; typedef typename add_value::type B3; typedef typename add_value::type B4; typedef list4 type; }; template struct list_av_5 { typedef typename add_value::type B1; typedef typename add_value::type B2; typedef typename add_value::type B3; typedef typename add_value::type B4; typedef typename add_value::type B5; typedef list5 type; }; template struct list_av_6 { typedef typename add_value::type B1; typedef typename add_value::type B2; typedef typename add_value::type B3; typedef typename add_value::type B4; typedef typename add_value::type B5; typedef typename add_value::type B6; typedef list6 type; }; template struct list_av_7 { typedef typename add_value::type B1; typedef typename add_value::type B2; typedef typename add_value::type B3; typedef typename add_value::type B4; typedef typename add_value::type B5; typedef typename add_value::type B6; typedef typename add_value::type B7; typedef list7 type; }; template struct list_av_8 { typedef typename add_value::type B1; typedef typename add_value::type B2; typedef typename add_value::type B3; typedef typename add_value::type B4; typedef typename add_value::type B5; typedef typename add_value::type B6; typedef typename add_value::type B7; typedef typename add_value::type B8; typedef list8 type; }; template struct list_av_9 { typedef typename add_value::type B1; typedef typename add_value::type B2; typedef typename add_value::type B3; typedef typename add_value::type B4; typedef typename add_value::type B5; typedef typename add_value::type B6; typedef typename add_value::type B7; typedef typename add_value::type B8; typedef typename add_value::type B9; typedef list9 type; }; } // namespace _bi // bind #ifndef BOOST_BIND #define BOOST_BIND bind #endif // generic function objects template _bi::bind_t BOOST_BIND(F f) { typedef _bi::list0 list_type; return _bi::bind_t (f, list_type()); } template _bi::bind_t::type> BOOST_BIND(F f, A1 a1) { typedef typename _bi::list_av_1::type list_type; return _bi::bind_t (f, list_type(a1)); } template _bi::bind_t::type> BOOST_BIND(F f, A1 a1, A2 a2) { typedef typename _bi::list_av_2::type list_type; return _bi::bind_t (f, list_type(a1, a2)); } template _bi::bind_t::type> BOOST_BIND(F f, A1 a1, A2 a2, A3 a3) { typedef typename _bi::list_av_3::type list_type; return _bi::bind_t(f, list_type(a1, a2, a3)); } template _bi::bind_t::type> BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4) { typedef typename _bi::list_av_4::type list_type; return _bi::bind_t(f, list_type(a1, a2, a3, a4)); } template _bi::bind_t::type> BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) { typedef typename _bi::list_av_5::type list_type; return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5)); } template _bi::bind_t::type> BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) { typedef typename _bi::list_av_6::type list_type; return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6)); } template _bi::bind_t::type> BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) { typedef typename _bi::list_av_7::type list_type; return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7)); } template _bi::bind_t::type> BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) { typedef typename _bi::list_av_8::type list_type; return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8)); } template _bi::bind_t::type> BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) { typedef typename _bi::list_av_9::type list_type; return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); } #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) // adaptable function objects template _bi::bind_t<_bi::unspecified, F, _bi::list0> BOOST_BIND(F f) { typedef _bi::list0 list_type; return _bi::bind_t<_bi::unspecified, F, list_type> (f, list_type()); } template _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_1::type> BOOST_BIND(F f, A1 a1) { typedef typename _bi::list_av_1::type list_type; return _bi::bind_t<_bi::unspecified, F, list_type> (f, list_type(a1)); } template _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_2::type> BOOST_BIND(F f, A1 a1, A2 a2) { typedef typename _bi::list_av_2::type list_type; return _bi::bind_t<_bi::unspecified, F, list_type> (f, list_type(a1, a2)); } template _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_3::type> BOOST_BIND(F f, A1 a1, A2 a2, A3 a3) { typedef typename _bi::list_av_3::type list_type; return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3)); } template _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_4::type> BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4) { typedef typename _bi::list_av_4::type list_type; return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4)); } template _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_5::type> BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) { typedef typename _bi::list_av_5::type list_type; return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5)); } template _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_6::type> BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) { typedef typename _bi::list_av_6::type list_type; return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6)); } template _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_7::type> BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) { typedef typename _bi::list_av_7::type list_type; return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7)); } template _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_8::type> BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) { typedef typename _bi::list_av_8::type list_type; return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8)); } template _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_9::type> BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) { typedef typename _bi::list_av_9::type list_type; return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); } #endif // !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) // function pointers #define BOOST_BIND_CC #define BOOST_BIND_ST #include #undef BOOST_BIND_CC #undef BOOST_BIND_ST #ifdef BOOST_BIND_ENABLE_STDCALL #define BOOST_BIND_CC __stdcall #define BOOST_BIND_ST #include #undef BOOST_BIND_CC #undef BOOST_BIND_ST #endif #ifdef BOOST_BIND_ENABLE_PASCAL #define BOOST_BIND_ST pascal #define BOOST_BIND_CC #include #undef BOOST_BIND_ST #undef BOOST_BIND_CC #endif // member function pointers #define BOOST_BIND_MF_NAME(X) X #define BOOST_BIND_MF_CC #include #undef BOOST_BIND_MF_NAME #undef BOOST_BIND_MF_CC #ifdef BOOST_MEM_FN_ENABLE_STDCALL #define BOOST_BIND_MF_NAME(X) X##_stdcall #define BOOST_BIND_MF_CC __stdcall #include #undef BOOST_BIND_MF_NAME #undef BOOST_BIND_MF_CC #endif } // namespace boost namespace { boost::_bi::arg<1> _1; boost::_bi::arg<2> _2; boost::_bi::arg<3> _3; boost::_bi::arg<4> _4; boost::_bi::arg<5> _5; boost::_bi::arg<6> _6; boost::_bi::arg<7> _7; boost::_bi::arg<8> _8; boost::_bi::arg<9> _9; } #endif // #ifndef BOOST_BIND_HPP_INCLUDED