Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r70997 - sandbox/shifted_ptr/boost
From: phil_at_[hidden]
Date: 2011-04-05 04:48:50


Author: pbouchard
Date: 2011-04-05 04:48:48 EDT (Tue, 05 Apr 2011)
New Revision: 70997
URL: http://svn.boost.org/trac/boost/changeset/70997

Log:
* Allocator function signature fix
Text files modified:
   sandbox/shifted_ptr/boost/shifted_allocator.hpp | 16 ++++++++--------
   1 files changed, 8 insertions(+), 8 deletions(-)

Modified: sandbox/shifted_ptr/boost/shifted_allocator.hpp
==============================================================================
--- sandbox/shifted_ptr/boost/shifted_allocator.hpp (original)
+++ sandbox/shifted_ptr/boost/shifted_allocator.hpp 2011-04-05 04:48:48 EDT (Tue, 05 Apr 2011)
@@ -52,8 +52,8 @@
         typedef shifted<T> value_type;
         typedef size_t size_type;
         typedef ptrdiff_t difference_type;
- typedef shifted_ptr<T> pointer;
- typedef shifted_ptr<const T> const_pointer;
+ typedef T * pointer;
+ typedef const T * const_pointer;
         typedef element_type & reference;
         typedef const element_type & const_reference;
 
@@ -77,26 +77,26 @@
             return size_t(-1) / sizeof(T);
         }
 
- value_type * allocate(size_type s, const void * = 0)
+ pointer allocate(size_type s, const void * = 0)
         {
             //value_type * p = (value_type *) value_type::operator new(sizeof(value_type));
             value_type * p = new value_type();
 
- return p;
+ return p->element();
         }
 
- void construct(value_type * p, const T & x)
+ void construct(pointer p, const T & x)
         {
             //::new (p) owned_base;
             //::new (p->element()) T(x);
         }
 
- void destroy(pointer & p)
+ void destroy(pointer p)
         {
- p.reset();
+ p->reset();
         }
 
- void deallocate(pointer & p, size_type)
+ void deallocate(pointer p, size_type)
         {
         }
     };


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