From cc3a33a19cc633cd39ef315e1b58aa0c2f78a381 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Mon, 19 Nov 2001 20:56:52 +0000 Subject: [PATCH] function_template.hpp: - Use boost::mem_fn internally to deal with calls to unbound member functions. [SVN r11731] --- include/boost/function/function_template.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/boost/function/function_template.hpp b/include/boost/function/function_template.hpp index d0aaeb8..8fc7185 100644 --- a/include/boost/function/function_template.hpp +++ b/include/boost/function/function_template.hpp @@ -22,6 +22,7 @@ # include # include # include +# include #endif // BOOST_FUNCTION_FUNCTION_TEMPLATE_HPP // Type of the default allocator @@ -143,7 +144,7 @@ namespace boost { { MemFunctionPtr f = reinterpret_cast(mem_function_ptr.mem_func_ptr); - return ((*a0).*f)(BOOST_FUNCTION_NOT_0_ARGS); + return mem_fn(f)(BOOST_FUNCTION_ARGS); } }; @@ -160,8 +161,8 @@ namespace boost { { MemFunctionPtr f = reinterpret_cast(mem_function_ptr.mem_func_ptr); - (a0->*f)(BOOST_FUNCTION_NOT_0_ARGS); - return unusable(); + mem_fn(f)(BOOST_FUNCTION_ARGS); + return unusable(); } }; #endif // BOOST_FUNCTION_NUM_ARGS > 0