From bacb5d67527b5e696ea1f89928373042b54fd110 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Tue, 17 Jun 2008 13:59:04 +0000 Subject: [PATCH] Attempt to work around problem with allocator casts in Boost.Function [SVN r46446] --- include/boost/function/function_base.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/function/function_base.hpp b/include/boost/function/function_base.hpp index 7d667ae..8d46711 100644 --- a/include/boost/function/function_base.hpp +++ b/include/boost/function/function_base.hpp @@ -432,7 +432,7 @@ namespace boost { // can't do the static_cast that we should do. const functor_wrapper_type* f = (const functor_wrapper_type*)(in_buffer.obj_ptr); - wrapper_allocator_type wrapper_allocator(static_cast(*f)); + wrapper_allocator_type wrapper_allocator(static_cast(*f)); wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1); wrapper_allocator.construct(copy, *f); @@ -443,7 +443,7 @@ namespace boost { /* Cast from the void pointer to the functor_wrapper_type */ functor_wrapper_type* victim = static_cast(in_buffer.obj_ptr); - wrapper_allocator_type wrapper_allocator(static_cast(*victim)); + wrapper_allocator_type wrapper_allocator(static_cast(*victim)); wrapper_allocator.destroy(victim); wrapper_allocator.deallocate(victim,1); out_buffer.obj_ptr = 0;