diff --git a/include/boost/function/function_template.hpp b/include/boost/function/function_template.hpp index ac4a5b24..71a7bb87 100644 --- a/include/boost/function/function_template.hpp +++ b/include/boost/function/function_template.hpp @@ -564,7 +564,7 @@ namespace boost { assign_to(const reference_wrapper& f, function_buffer& functor, function_obj_ref_tag) const { - functor.members.obj_ref.obj_ptr = (void *)(f.get_pointer()); + functor.members.obj_ref.obj_ptr = static_cast(f.get_pointer()); functor.members.obj_ref.is_const_qualified = std::is_const::value; functor.members.obj_ref.is_volatile_qualified = std::is_volatile::value; return true;