--- boost_1_41_0/boost/lambda/detail/function_adaptors.hpp 2008-06-28 14:57:20.000000000 +0100 +++ boost_1_41_0/boost/lambda/detail/function_adaptors.hpp 2010-04-01 17:31:21.000000000 +0100 @@ -13,6 +13,7 @@ #define BOOST_LAMBDA_FUNCTION_ADAPTORS_HPP #include "boost/type_traits/same_traits.hpp" +#include namespace boost { namespace lambda { @@ -183,6 +184,10 @@ static Result apply( Result (Object::*func)() const, const Object& o) { return (o.*func)(); } + template + static Result apply( Result (Object::*func)() const, const ObjectPtr& o, typename disable_if >::type* = 0) { + return (get_pointer(o)->*func)(); + } }; template @@ -197,6 +202,10 @@ static Result apply( Result (Object::*func)(), Object& o) { return (o.*func)(); } + template + static Result apply( Result (Object::*func)(), const ObjectPtr& o, typename disable_if >::type* = 0) { + return (get_pointer(o)->*func)(); + } }; template @@ -235,6 +244,10 @@ A1& a1) { return (o.*func)(a1); } + template + static Result apply( Result (Object::*func)(Arg1) const, const ObjectPtr& o, A1& a1, typename disable_if >::type* = 0) { + return (get_pointer(o)->*func)(a1); + } }; template @@ -249,6 +262,10 @@ static Result apply( Result (Object::*func)(Arg1), Object& o, A1& a1) { return (o.*func)(a1); } + template + static Result apply( Result (Object::*func)(Arg1), const ObjectPtr& o, A1& a1, typename disable_if >::type* = 0) { + return (get_pointer(o)->*func)(a1); + } }; template @@ -285,6 +302,10 @@ static Result apply( Result (Object::*func)(Arg1, Arg2) const, const Object& o, A1& a1, A2& a2) { return (o.*func)(a1, a2); } + template + static Result apply( Result (Object::*func)(Arg1, Arg2) const, const ObjectPtr& o, A1& a1, A2& a2, typename disable_if >::type* = 0) { + return (get_pointer(o)->*func)(a1, a2); + } }; template @@ -299,6 +320,10 @@ static Result apply( Result (Object::*func)(Arg1, Arg2), Object& o, A1& a1, A2& a2) { return (o.*func)(a1, a2); } + template + static Result apply( Result (Object::*func)(Arg1, Arg2), const ObjectPtr& o, A1& a1, A2& a2, typename disable_if >::type* = 0) { + return (get_pointer(o)->*func)(a1, a2); + } }; template @@ -335,6 +360,10 @@ static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3) const, const Object& o, A1& a1, A2& a2, A3& a3) { return (o.*func)(a1, a2, a3); } + template + static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3) const, const ObjectPtr& o, A1& a1, A2& a2, A3& a3, typename disable_if >::type* = 0) { + return (get_pointer(o)->*func)(a1, a2, a3); + } }; template @@ -349,6 +378,10 @@ static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3), Object& o, A1& a1, A2& a2, A3& a3) { return (o.*func)(a1, a2, a3); } + template + static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3), const ObjectPtr& o, A1& a1, A2& a2, A3& a3, typename disable_if >::type* = 0) { + return (get_pointer(o)->*func)(a1, a2, a3); + } }; template @@ -385,6 +418,10 @@ static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4) const, const Object& o, A1& a1, A2& a2, A3& a3, A4& a4) { return (o.*func)(a1, a2, a3, a4); } + template + static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4) const, const ObjectPtr& o, A1& a1, A2& a2, A3& a3, A4& a4, typename disable_if >::type* = 0) { + return (get_pointer(o)->*func)(a1, a2, a3, a4); + } }; template @@ -399,6 +436,10 @@ static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4), Object& o, A1& a1, A2& a2, A3& a3, A4& a4) { return (o.*func)(a1, a2, a3, a4); } + template + static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4), const ObjectPtr& o, A1& a1, A2& a2, A3& a3, A4& a4, typename disable_if >::type* = 0) { + return (get_pointer(o)->*func)(a1, a2, a3, a4); + } }; template @@ -435,6 +476,10 @@ static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5) const, const Object& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5) { return (o.*func)(a1, a2, a3, a4, a5); } + template + static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5) const, const ObjectPtr& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, typename disable_if >::type* = 0) { + return (get_pointer(o)->*func)(a1, a2, a3, a4, a5); + } }; template @@ -449,6 +494,10 @@ static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5), Object& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5) { return (o.*func)(a1, a2, a3, a4, a5); } + template + static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5), const ObjectPtr& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, typename disable_if >::type* = 0) { + return (get_pointer(o)->*func)(a1, a2, a3, a4, a5); + } }; template @@ -485,6 +534,10 @@ static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6) const, const Object& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6) { return (o.*func)(a1, a2, a3, a4, a5, a6); } + template + static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6) const, const ObjectPtr& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, typename disable_if >::type* = 0) { + return (get_pointer(o)->*func)(a1, a2, a3, a4, a5, a6); + } }; template @@ -499,6 +552,10 @@ static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6), Object& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6) { return (o.*func)(a1, a2, a3, a4, a5, a6); } + template + static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6), const ObjectPtr& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, typename disable_if >::type* = 0) { + return (get_pointer(o)->*func)(a1, a2, a3, a4, a5, a6); + } }; template @@ -535,6 +592,10 @@ static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7) const, const Object& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7) { return (o.*func)(a1, a2, a3, a4, a5, a6, a7); } + template + static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7) const, const ObjectPtr& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, typename disable_if >::type* = 0) { + return (get_pointer(o)->*func)(a1, a2, a3, a4, a5, a6, a7); + } }; template @@ -549,6 +610,10 @@ static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7), Object& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7) { return (o.*func)(a1, a2, a3, a4, a5, a6, a7); } + template + static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7), const ObjectPtr& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, typename disable_if >::type* = 0) { + return (get_pointer(o)->*func)(a1, a2, a3, a4, a5, a6, a7); + } }; template @@ -585,6 +650,10 @@ static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8) const, const Object& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8) { return (o.*func)(a1, a2, a3, a4, a5, a6, a7, a8); } + template + static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8) const, const ObjectPtr& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8, typename disable_if >::type* = 0) { + return (get_pointer(o)->*func)(a1, a2, a3, a4, a5, a6, a7, a8); + } }; template @@ -599,6 +668,10 @@ static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8), Object& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8) { return (o.*func)(a1, a2, a3, a4, a5, a6, a7, a8); } + template + static Result apply( Result (Object::*func)(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6, Arg7, Arg8), const ObjectPtr& o, A1& a1, A2& a2, A3& a3, A4& a4, A5& a5, A6& a6, A7& a7, A8& a8, typename disable_if >::type* = 0) { + return (get_pointer(o)->*func)(a1, a2, a3, a4, a5, a6, a7, a8); + } }; template