diff --git a/include/boost/function/function_template.hpp b/include/boost/function/function_template.hpp index 8fc7185..bbe61c3 100644 --- a/include/boost/function/function_template.hpp +++ b/include/boost/function/function_template.hpp @@ -142,8 +142,8 @@ namespace boost { BOOST_FUNCTION_COMMA BOOST_FUNCTION_PARMS) { - MemFunctionPtr f = - reinterpret_cast(mem_function_ptr.mem_func_ptr); + // Was a reinterpret_cast<>, but not all compilers handle it + MemFunctionPtr f = (MemFunctionPtr)(mem_function_ptr.mem_func_ptr); return mem_fn(f)(BOOST_FUNCTION_ARGS); } }; @@ -159,8 +159,8 @@ namespace boost { BOOST_FUNCTION_COMMA BOOST_FUNCTION_PARMS) { - MemFunctionPtr f = - reinterpret_cast(mem_function_ptr.mem_func_ptr); + // Was a reinterpret_cast<>, but not all compilers handle it + MemFunctionPtr f = (MemFunctionPtr)(mem_function_ptr.mem_func_ptr); mem_fn(f)(BOOST_FUNCTION_ARGS); return unusable(); } @@ -448,8 +448,9 @@ namespace boost { invoker = &invoker_type::invoke; manager = &detail::function::functor_manager::manage; + // Was a reinterpret_cast<>, but not all compilers handle it functor = manager(detail::function::any_pointer( - reinterpret_cast(f) + (stored_mem_func_type)(f) ), detail::function::clone_functor); }