sl@0: #ifndef BOOST_BIND_APPLY_HPP_INCLUDED sl@0: #define BOOST_BIND_APPLY_HPP_INCLUDED sl@0: sl@0: // sl@0: // apply.hpp sl@0: // sl@0: // Copyright (c) 2002, 2003 Peter Dimov and Multi Media Ltd. sl@0: // sl@0: // Distributed under the Boost Software License, Version 1.0. (See sl@0: // accompanying file LICENSE_1_0.txt or copy at sl@0: // http://www.boost.org/LICENSE_1_0.txt) sl@0: // sl@0: sl@0: namespace boost sl@0: { sl@0: sl@0: template struct apply sl@0: { sl@0: typedef R result_type; sl@0: sl@0: template result_type operator()(F & f) const sl@0: { sl@0: return f(); sl@0: } sl@0: sl@0: template result_type operator()(F & f, A1 & a1) const sl@0: { sl@0: return f(a1); sl@0: } sl@0: sl@0: template result_type operator()(F & f, A1 & a1, A2 & a2) const sl@0: { sl@0: return f(a1, a2); sl@0: } sl@0: sl@0: template result_type operator()(F & f, A1 & a1, A2 & a2, A3 & a3) const sl@0: { sl@0: return f(a1, a2, a3); sl@0: } sl@0: sl@0: template result_type operator()(F & f, A1 & a1, A2 & a2, A3 & a3, A4 & a4) const sl@0: { sl@0: return f(a1, a2, a3, a4); sl@0: } sl@0: sl@0: template result_type operator()(F & f, A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5) const sl@0: { sl@0: return f(a1, a2, a3, a4, a5); sl@0: } sl@0: sl@0: template result_type operator()(F & f, A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6) const sl@0: { sl@0: return f(a1, a2, a3, a4, a5, a6); sl@0: } sl@0: sl@0: template result_type operator()(F & f, A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7) const sl@0: { sl@0: return f(a1, a2, a3, a4, a5, a6, a7); sl@0: } sl@0: sl@0: template result_type operator()(F & f, A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8) const sl@0: { sl@0: return f(a1, a2, a3, a4, a5, a6, a7, a8); sl@0: } sl@0: sl@0: template result_type operator()(F & f, A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9) const sl@0: { sl@0: return f(a1, a2, a3, a4, a5, a6, a7, a8, a9); sl@0: } sl@0: }; sl@0: sl@0: } // namespace boost sl@0: sl@0: #endif // #ifndef BOOST_BIND_APPLY_HPP_INCLUDED