Update contrib.
1 #ifndef BOOST_BIND_MAKE_ADAPTABLE_HPP_INCLUDED
2 #define BOOST_BIND_MAKE_ADAPTABLE_HPP_INCLUDED
7 // Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
9 // Distributed under the Boost Software License, Version 1.0. (See
10 // accompanying file LICENSE_1_0.txt or copy at
11 // http://www.boost.org/LICENSE_1_0.txt)
20 template<class R, class F> class af0
24 typedef R result_type;
26 explicit af0(F f): f_(f)
30 result_type operator()()
35 result_type operator()() const
45 template<class R, class A1, class F> class af1
49 typedef R result_type;
50 typedef A1 argument_type;
53 explicit af1(F f): f_(f)
57 result_type operator()(A1 a1)
62 result_type operator()(A1 a1) const
72 template<class R, class A1, class A2, class F> class af2
76 typedef R result_type;
77 typedef A1 first_argument_type;
78 typedef A2 second_argument_type;
82 explicit af2(F f): f_(f)
86 result_type operator()(A1 a1, A2 a2)
91 result_type operator()(A1 a1, A2 a2) const
101 template<class R, class A1, class A2, class A3, class F> class af3
105 typedef R result_type;
106 typedef A1 arg1_type;
107 typedef A2 arg2_type;
108 typedef A3 arg3_type;
110 explicit af3(F f): f_(f)
114 result_type operator()(A1 a1, A2 a2, A3 a3)
116 return f_(a1, a2, a3);
119 result_type operator()(A1 a1, A2 a2, A3 a3) const
121 return f_(a1, a2, a3);
129 template<class R, class A1, class A2, class A3, class A4, class F> class af4
133 typedef R result_type;
134 typedef A1 arg1_type;
135 typedef A2 arg2_type;
136 typedef A3 arg3_type;
137 typedef A4 arg4_type;
139 explicit af4(F f): f_(f)
143 result_type operator()(A1 a1, A2 a2, A3 a3, A4 a4)
145 return f_(a1, a2, a3, a4);
148 result_type operator()(A1 a1, A2 a2, A3 a3, A4 a4) const
150 return f_(a1, a2, a3, a4);
160 template<class R, class F> _bi::af0<R, F> make_adaptable(F f)
162 return _bi::af0<R, F>(f);
165 template<class R, class A1, class F> _bi::af1<R, A1, F> make_adaptable(F f)
167 return _bi::af1<R, A1, F>(f);
170 template<class R, class A1, class A2, class F> _bi::af2<R, A1, A2, F> make_adaptable(F f)
172 return _bi::af2<R, A1, A2, F>(f);
175 template<class R, class A1, class A2, class A3, class F> _bi::af3<R, A1, A2, A3, F> make_adaptable(F f)
177 return _bi::af3<R, A1, A2, A3, F>(f);
180 template<class R, class A1, class A2, class A3, class A4, class F> _bi::af4<R, A1, A2, A3, A4, F> make_adaptable(F f)
182 return _bi::af4<R, A1, A2, A3, A4, F>(f);
187 #endif // #ifndef BOOST_BIND_MAKE_ADAPTABLE_HPP_INCLUDED