Boost logo

Boost-Commit :

From: dgregor_at_[hidden]
Date: 2008-06-17 09:59:04


Author: dgregor
Date: 2008-06-17 09:59:04 EDT (Tue, 17 Jun 2008)
New Revision: 46446
URL: http://svn.boost.org/trac/boost/changeset/46446

Log:
Attempt to work around problem with allocator casts in Boost.Function
Text files modified:
   trunk/boost/function/function_base.hpp | 4 ++--
   1 files changed, 2 insertions(+), 2 deletions(-)

Modified: trunk/boost/function/function_base.hpp
==============================================================================
--- trunk/boost/function/function_base.hpp (original)
+++ trunk/boost/function/function_base.hpp 2008-06-17 09:59:04 EDT (Tue, 17 Jun 2008)
@@ -432,7 +432,7 @@
             // 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<wrapper_allocator_type const &>(*f));
+ wrapper_allocator_type wrapper_allocator(static_cast<Allocator const &>(*f));
             wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1);
             wrapper_allocator.construct(copy, *f);
 
@@ -443,7 +443,7 @@
             /* Cast from the void pointer to the functor_wrapper_type */
             functor_wrapper_type* victim =
               static_cast<functor_wrapper_type*>(in_buffer.obj_ptr);
- wrapper_allocator_type wrapper_allocator(static_cast<wrapper_allocator_type const &>(*victim));
+ wrapper_allocator_type wrapper_allocator(static_cast<Allocator const &>(*victim));
             wrapper_allocator.destroy(victim);
             wrapper_allocator.deallocate(victim,1);
             out_buffer.obj_ptr = 0;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk