Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r52859 - sandbox/memory/boost/memory
From: xushiweizh_at_[hidden]
Date: 2009-05-09 03:01:52


Author: xushiwei
Date: 2009-05-09 03:01:51 EDT (Sat, 09 May 2009)
New Revision: 52859
URL: http://svn.boost.org/trac/boost/changeset/52859

Log:
proxy_alloc:
1. operator AllocT&
2. operator&

Text files modified:
   sandbox/memory/boost/memory/block_pool.hpp | 3 ++-
   1 files changed, 2 insertions(+), 1 deletions(-)

Modified: sandbox/memory/boost/memory/block_pool.hpp
==============================================================================
--- sandbox/memory/boost/memory/block_pool.hpp (original)
+++ sandbox/memory/boost/memory/block_pool.hpp 2009-05-09 03:01:51 EDT (Sat, 09 May 2009)
@@ -47,7 +47,8 @@
         __forceinline void BOOST_MEMORY_CALL deallocate(void* p) { m_alloc->deallocate(p); }
         __forceinline void BOOST_MEMORY_CALL swap(proxy_alloc& o) { std::swap(m_alloc, o.m_alloc); }
         __forceinline size_t BOOST_MEMORY_CALL alloc_size(void* p) const { return m_alloc->alloc_size(p); }
- __forceinline operator AllocT*() const { return m_alloc; }
+ __forceinline operator AllocT&() const { return *m_alloc; }
+ __forceinline AllocT* operator&() const { return m_alloc; }
 };
 
 // -------------------------------------------------------------------------


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