Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76223 - in trunk/boost/interprocess: . allocators allocators/detail detail ipc mem_algo mem_algo/detail smart_ptr smart_ptr/detail
From: igaztanaga_at_[hidden]
Date: 2011-12-30 04:00:57


Author: igaztanaga
Date: 2011-12-30 04:00:54 EST (Fri, 30 Dec 2011)
New Revision: 76223
URL: http://svn.boost.org/trac/boost/changeset/76223

Log:
Replaced pointer_to_other with pointer_traits
Text files modified:
   trunk/boost/interprocess/allocators/adaptive_pool.hpp | 12 +++++----
   trunk/boost/interprocess/allocators/allocator.hpp | 23 ++++++++++--------
   trunk/boost/interprocess/allocators/detail/adaptive_node_pool.hpp | 1
   trunk/boost/interprocess/allocators/detail/allocator_common.hpp | 37 +++++++++++++++++------------
   trunk/boost/interprocess/allocators/detail/node_pool.hpp | 1
   trunk/boost/interprocess/allocators/node_allocator.hpp | 12 +++++----
   trunk/boost/interprocess/allocators/private_adaptive_pool.hpp | 12 +++++----
   trunk/boost/interprocess/allocators/private_node_allocator.hpp | 13 ++++++----
   trunk/boost/interprocess/detail/segment_manager_helper.hpp | 7 +++--
   trunk/boost/interprocess/ipc/message_queue.hpp | 30 +++++++++++++++--------
   trunk/boost/interprocess/mapped_region.hpp | 4 +-
   trunk/boost/interprocess/mem_algo/detail/multi_simple_seq_fit_impl.hpp | 7 +++--
   trunk/boost/interprocess/mem_algo/detail/simple_seq_fit_impl.hpp | 11 +++++---
   trunk/boost/interprocess/mem_algo/rbtree_best_fit.hpp | 13 ++++++----
   trunk/boost/interprocess/offset_ptr.hpp | 9 ++++--
   trunk/boost/interprocess/smart_ptr/deleter.hpp | 12 +++++----
   trunk/boost/interprocess/smart_ptr/detail/shared_count.hpp | 49 +++++++++++++++++++++++++--------------
   trunk/boost/interprocess/smart_ptr/detail/sp_counted_impl.hpp | 13 +++++----
   trunk/boost/interprocess/smart_ptr/intrusive_ptr.hpp | 6 +++-
   trunk/boost/interprocess/smart_ptr/scoped_ptr.hpp | 5 ----
   trunk/boost/interprocess/smart_ptr/shared_ptr.hpp | 26 +++++++++++++-------
   trunk/boost/interprocess/smart_ptr/weak_ptr.hpp | 7 +++--
   22 files changed, 184 insertions(+), 126 deletions(-)

Modified: trunk/boost/interprocess/allocators/adaptive_pool.hpp
==============================================================================
--- trunk/boost/interprocess/allocators/adaptive_pool.hpp (original)
+++ trunk/boost/interprocess/allocators/adaptive_pool.hpp 2011-12-30 04:00:54 EST (Fri, 30 Dec 2011)
@@ -18,7 +18,7 @@
 #include <boost/interprocess/detail/config_begin.hpp>
 #include <boost/interprocess/detail/workaround.hpp>
 
-#include <boost/pointer_to_other.hpp>
+#include <boost/intrusive/pointer_traits.hpp>
 
 #include <boost/interprocess/interprocess_fwd.hpp>
 #include <boost/assert.hpp>
@@ -83,10 +83,12 @@
 
    public:
    //-------
- typedef typename boost::
- pointer_to_other<void_pointer, T>::type pointer;
- typedef typename boost::
- pointer_to_other<void_pointer, const T>::type const_pointer;
+ typedef typename boost::intrusive::
+ pointer_traits<void_pointer>::template
+ rebind_pointer<T>::type pointer;
+ typedef typename boost::intrusive::
+ pointer_traits<void_pointer>::template
+ rebind_pointer<const T>::type const_pointer;
    typedef T value_type;
    typedef typename ipcdetail::add_reference
                      <value_type>::type reference;

Modified: trunk/boost/interprocess/allocators/allocator.hpp
==============================================================================
--- trunk/boost/interprocess/allocators/allocator.hpp (original)
+++ trunk/boost/interprocess/allocators/allocator.hpp 2011-12-30 04:00:54 EST (Fri, 30 Dec 2011)
@@ -18,7 +18,7 @@
 #include <boost/interprocess/detail/config_begin.hpp>
 #include <boost/interprocess/detail/workaround.hpp>
 
-#include <boost/pointer_to_other.hpp>
+#include <boost/intrusive/pointer_traits.hpp>
 
 #include <boost/interprocess/interprocess_fwd.hpp>
 #include <boost/interprocess/containers/allocation_type.hpp>
@@ -67,13 +67,14 @@
    typedef typename segment_manager::void_pointer aux_pointer_t;
 
    //Typedef to const void pointer
- typedef typename
- boost::pointer_to_other
- <aux_pointer_t, const void>::type cvoid_ptr;
+ typedef typename boost::intrusive::
+ pointer_traits<aux_pointer_t>::template
+ rebind_pointer<const void>::type cvoid_ptr;
 
    //Pointer to the allocator
- typedef typename boost::pointer_to_other
- <cvoid_ptr, segment_manager>::type alloc_ptr_t;
+ typedef typename boost::intrusive::
+ pointer_traits<cvoid_ptr>::template
+ rebind_pointer<segment_manager>::type alloc_ptr_t;
 
    //Not assignable from related allocator
    template<class T2, class SegmentManager2>
@@ -88,10 +89,12 @@
 
    public:
    typedef T value_type;
- typedef typename boost::pointer_to_other
- <cvoid_ptr, T>::type pointer;
- typedef typename boost::
- pointer_to_other<pointer, const T>::type const_pointer;
+ typedef typename boost::intrusive::
+ pointer_traits<cvoid_ptr>::template
+ rebind_pointer<T>::type pointer;
+ typedef typename boost::intrusive::
+ pointer_traits<pointer>::template
+ rebind_pointer<const T>::type const_pointer;
    typedef typename ipcdetail::add_reference
                      <value_type>::type reference;
    typedef typename ipcdetail::add_reference

Modified: trunk/boost/interprocess/allocators/detail/adaptive_node_pool.hpp
==============================================================================
--- trunk/boost/interprocess/allocators/detail/adaptive_node_pool.hpp (original)
+++ trunk/boost/interprocess/allocators/detail/adaptive_node_pool.hpp 2011-12-30 04:00:54 EST (Fri, 30 Dec 2011)
@@ -17,7 +17,6 @@
 
 #include <boost/interprocess/detail/config_begin.hpp>
 #include <boost/interprocess/detail/workaround.hpp>
-#include <boost/pointer_to_other.hpp>
 #include <boost/interprocess/detail/utilities.hpp>
 #include <boost/interprocess/detail/math_functions.hpp>
 #include <boost/intrusive/set.hpp>

Modified: trunk/boost/interprocess/allocators/detail/allocator_common.hpp
==============================================================================
--- trunk/boost/interprocess/allocators/detail/allocator_common.hpp (original)
+++ trunk/boost/interprocess/allocators/detail/allocator_common.hpp 2011-12-30 04:00:54 EST (Fri, 30 Dec 2011)
@@ -14,7 +14,7 @@
 #include <boost/interprocess/detail/config_begin.hpp>
 #include <boost/interprocess/detail/workaround.hpp>
 
-#include <boost/pointer_to_other.hpp>
+#include <boost/intrusive/pointer_traits.hpp>
 
 #include <boost/interprocess/interprocess_fwd.hpp>
 #include <boost/interprocess/detail/utilities.hpp> //to_raw_pointer
@@ -146,8 +146,9 @@
 {
    typedef typename NodePool::segment_manager::
       void_pointer void_pointer;
- typedef typename pointer_to_other
- <void_pointer, NodePool>::type node_pool_ptr;
+ typedef typename boost::intrusive::
+ pointer_traits<void_pointer>::template
+ rebind_pointer<NodePool>::type node_pool_ptr;
    typedef typename NodePool::multiallocation_chain multiallocation_chain;
    typedef typename NodePool::segment_manager::size_type size_type;
    node_pool_ptr mp_node_pool;
@@ -312,10 +313,12 @@
    typedef typename SegmentManager::void_pointer void_pointer;
 
    public:
- typedef typename boost::
- pointer_to_other<void_pointer, T>::type pointer;
- typedef typename boost::
- pointer_to_other<void_pointer, const T>::type const_pointer;
+ typedef typename boost::intrusive::
+ pointer_traits<void_pointer>::template
+ rebind_pointer<T>::type pointer;
+ typedef typename boost::intrusive::
+ pointer_traits<void_pointer>::template
+ rebind_pointer<const T>::type const_pointer;
    typedef T value_type;
    typedef typename ipcdetail::add_reference
                      <value_type>::type reference;
@@ -416,14 +419,17 @@
    { return static_cast<Derived*>(this); }
 
    typedef typename SegmentManager::void_pointer void_pointer;
- typedef typename boost::
- pointer_to_other<void_pointer, const void>::type cvoid_pointer;
+ typedef typename boost::intrusive::
+ pointer_traits<void_pointer>::template
+ rebind_pointer<const void>::type cvoid_pointer;
 
    public:
- typedef typename boost::
- pointer_to_other<void_pointer, T>::type pointer;
- typedef typename boost::
- pointer_to_other<void_pointer, const T>::type const_pointer;
+ typedef typename boost::intrusive::
+ pointer_traits<void_pointer>::template
+ rebind_pointer<T>::type pointer;
+ typedef typename boost::intrusive::
+ pointer_traits<void_pointer>::template
+ rebind_pointer<const T>::type const_pointer;
    typedef T value_type;
    typedef typename ipcdetail::add_reference
                      <value_type>::type reference;
@@ -544,8 +550,9 @@
    typedef NodePool node_pool_t;
    typedef typename NodePool::segment_manager segment_manager;
    typedef typename segment_manager::void_pointer void_pointer;
- typedef typename boost::
- pointer_to_other<void_pointer, const void>::type cvoid_pointer;
+ typedef typename boost::intrusive::
+ pointer_traits<void_pointer>::template
+ rebind_pointer<const void>::type cvoid_pointer;
    typedef typename base_t::pointer pointer;
    typedef typename base_t::size_type size_type;
    typedef typename base_t::multiallocation_chain multiallocation_chain;

Modified: trunk/boost/interprocess/allocators/detail/node_pool.hpp
==============================================================================
--- trunk/boost/interprocess/allocators/detail/node_pool.hpp (original)
+++ trunk/boost/interprocess/allocators/detail/node_pool.hpp 2011-12-30 04:00:54 EST (Fri, 30 Dec 2011)
@@ -20,7 +20,6 @@
 
 #include <boost/intrusive/slist.hpp>
 #include <boost/math/common_factor_ct.hpp>
-#include <boost/pointer_to_other.hpp>
 
 #include <boost/interprocess/detail/utilities.hpp>
 #include <boost/interprocess/allocators/detail/allocator_common.hpp>

Modified: trunk/boost/interprocess/allocators/node_allocator.hpp
==============================================================================
--- trunk/boost/interprocess/allocators/node_allocator.hpp (original)
+++ trunk/boost/interprocess/allocators/node_allocator.hpp 2011-12-30 04:00:54 EST (Fri, 30 Dec 2011)
@@ -18,7 +18,7 @@
 #include <boost/interprocess/detail/config_begin.hpp>
 #include <boost/interprocess/detail/workaround.hpp>
 
-#include <boost/pointer_to_other.hpp>
+#include <boost/intrusive/pointer_traits.hpp>
 
 #include <boost/interprocess/interprocess_fwd.hpp>
 #include <boost/assert.hpp>
@@ -80,10 +80,12 @@
 
    public:
    //-------
- typedef typename boost::
- pointer_to_other<void_pointer, T>::type pointer;
- typedef typename boost::
- pointer_to_other<void_pointer, const T>::type const_pointer;
+ typedef typename boost::intrusive::
+ pointer_traits<void_pointer>::template
+ rebind_pointer<T>::type pointer;
+ typedef typename boost::intrusive::
+ pointer_traits<void_pointer>::template
+ rebind_pointer<const T>::type const_pointer;
    typedef T value_type;
    typedef typename ipcdetail::add_reference
                      <value_type>::type reference;

Modified: trunk/boost/interprocess/allocators/private_adaptive_pool.hpp
==============================================================================
--- trunk/boost/interprocess/allocators/private_adaptive_pool.hpp (original)
+++ trunk/boost/interprocess/allocators/private_adaptive_pool.hpp 2011-12-30 04:00:54 EST (Fri, 30 Dec 2011)
@@ -18,7 +18,7 @@
 #include <boost/interprocess/detail/config_begin.hpp>
 #include <boost/interprocess/detail/workaround.hpp>
 
-#include <boost/pointer_to_other.hpp>
+#include <boost/intrusive/pointer_traits.hpp>
 
 #include <boost/interprocess/interprocess_fwd.hpp>
 #include <boost/assert.hpp>
@@ -81,10 +81,12 @@
    /// @endcond
 
    public:
- typedef typename boost::
- pointer_to_other<void_pointer, T>::type pointer;
- typedef typename boost::
- pointer_to_other<void_pointer, const T>::type const_pointer;
+ typedef typename boost::intrusive::
+ pointer_traits<void_pointer>::template
+ rebind_pointer<T>::type pointer;
+ typedef typename boost::intrusive::
+ pointer_traits<void_pointer>::template
+ rebind_pointer<const T>::type const_pointer;
    typedef T value_type;
    typedef typename ipcdetail::add_reference
                      <value_type>::type reference;

Modified: trunk/boost/interprocess/allocators/private_node_allocator.hpp
==============================================================================
--- trunk/boost/interprocess/allocators/private_node_allocator.hpp (original)
+++ trunk/boost/interprocess/allocators/private_node_allocator.hpp 2011-12-30 04:00:54 EST (Fri, 30 Dec 2011)
@@ -18,7 +18,7 @@
 #include <boost/interprocess/detail/config_begin.hpp>
 #include <boost/interprocess/detail/workaround.hpp>
 
-#include <boost/pointer_to_other.hpp>
+#include <boost/intrusive/pointer_traits.hpp>
 
 #include <boost/interprocess/interprocess_fwd.hpp>
 #include <boost/assert.hpp>
@@ -75,10 +75,13 @@
    /// @endcond
 
    public:
- typedef typename boost::
- pointer_to_other<void_pointer, T>::type pointer;
- typedef typename boost::
- pointer_to_other<void_pointer, const T>::type const_pointer;
+
+ typedef typename boost::intrusive::
+ pointer_traits<void_pointer>::template
+ rebind_pointer<T>::type pointer;
+ typedef typename boost::intrusive::
+ pointer_traits<void_pointer>::template
+ rebind_pointer<const T>::type const_pointer;
    typedef T value_type;
    typedef typename ipcdetail::add_reference
                      <value_type>::type reference;

Modified: trunk/boost/interprocess/detail/segment_manager_helper.hpp
==============================================================================
--- trunk/boost/interprocess/detail/segment_manager_helper.hpp (original)
+++ trunk/boost/interprocess/detail/segment_manager_helper.hpp 2011-12-30 04:00:54 EST (Fri, 30 Dec 2011)
@@ -18,7 +18,7 @@
 #include <boost/interprocess/detail/config_begin.hpp>
 #include <boost/interprocess/detail/workaround.hpp>
 
-#include <boost/pointer_to_other.hpp>
+#include <boost/intrusive/pointer_traits.hpp>
 
 #include <boost/detail/no_exceptions_support.hpp>
 #include <boost/interprocess/detail/type_traits.hpp>
@@ -335,8 +335,9 @@
 template<class CharT, class VoidPointer>
 struct index_key
 {
- typedef typename boost::
- pointer_to_other<VoidPointer, const CharT>::type const_char_ptr_t;
+ typedef typename boost::intrusive::
+ pointer_traits<VoidPointer>::template
+ rebind_pointer<const CharT>::type const_char_ptr_t;
    typedef CharT char_type;
    typedef typename boost::intrusive::pointer_traits<const_char_ptr_t>::difference_type difference_type;
    typedef typename boost::make_unsigned<difference_type>::type size_type;

Modified: trunk/boost/interprocess/ipc/message_queue.hpp
==============================================================================
--- trunk/boost/interprocess/ipc/message_queue.hpp (original)
+++ trunk/boost/interprocess/ipc/message_queue.hpp 2011-12-30 04:00:54 EST (Fri, 30 Dec 2011)
@@ -26,7 +26,7 @@
 #include <boost/interprocess/permissions.hpp>
 #include <boost/detail/no_exceptions_support.hpp>
 #include <boost/interprocess/detail/type_traits.hpp>
-#include <boost/pointer_to_other.hpp>
+#include <boost/intrusive/pointer_traits.hpp>
 #include <boost/type_traits/make_unsigned.hpp>
 #include <boost/type_traits/alignment_of.hpp>
 #include <boost/intrusive/pointer_traits.hpp>
@@ -56,7 +56,9 @@
 
    public:
    typedef VoidPointer void_pointer;
- typedef typename boost::pointer_to_other<void_pointer, char>::type char_ptr;
+ typedef typename boost::intrusive::
+ pointer_traits<void_pointer>::template
+ rebind_pointer<char>::type char_ptr;
    typedef typename boost::intrusive::pointer_traits<char_ptr>::difference_type difference_type;
    typedef typename boost::make_unsigned<difference_type>::type size_type;
 
@@ -188,8 +190,9 @@
 class msg_hdr_t
 {
    typedef VoidPointer void_pointer;
- typedef typename boost::
- pointer_to_other<VoidPointer, char>::type char_ptr;
+ typedef typename boost::intrusive::
+ pointer_traits<void_pointer>::template
+ rebind_pointer<char>::type char_ptr;
    typedef typename boost::intrusive::pointer_traits<char_ptr>::difference_type difference_type;
    typedef typename boost::make_unsigned<difference_type>::type size_type;
 
@@ -204,8 +207,9 @@
 template<class VoidPointer>
 class priority_functor
 {
- typedef typename boost::
- pointer_to_other<VoidPointer, msg_hdr_t<VoidPointer> >::type msg_hdr_ptr_t;
+ typedef typename boost::intrusive::
+ pointer_traits<VoidPointer>::template
+ rebind_pointer<msg_hdr_t<VoidPointer> >::type msg_hdr_ptr_t;
 
    public:
    bool operator()(const msg_hdr_ptr_t &msg1,
@@ -251,13 +255,15 @@
 {
    typedef VoidPointer void_pointer;
    typedef msg_hdr_t<void_pointer> msg_header;
- typedef typename boost::
- pointer_to_other<void_pointer, msg_header>::type msg_hdr_ptr_t;
+ typedef typename boost::intrusive::
+ pointer_traits<void_pointer>::template
+ rebind_pointer<msg_header>::type msg_hdr_ptr_t;
    typedef typename boost::intrusive::pointer_traits
       <msg_hdr_ptr_t>::difference_type difference_type;
    typedef typename boost::make_unsigned<difference_type>::type size_type;
- typedef typename boost::
- pointer_to_other<void_pointer, msg_hdr_ptr_t>::type msg_hdr_ptr_ptr_t;
+ typedef typename boost::intrusive::
+ pointer_traits<void_pointer>::template
+ rebind_pointer<msg_hdr_ptr_t>::type msg_hdr_ptr_ptr_t;
 
    public:
    //!Constructor. This object must be constructed in the beginning of the
@@ -376,7 +382,9 @@
 class initialization_func_t
 {
    public:
- typedef typename boost::pointer_to_other<VoidPointer, char>::type char_ptr;
+ typedef typename boost::intrusive::
+ pointer_traits<VoidPointer>::template
+ rebind_pointer<char>::type char_ptr;
    typedef typename boost::intrusive::pointer_traits<char_ptr>::difference_type difference_type;
    typedef typename boost::make_unsigned<difference_type>::type size_type;
 

Modified: trunk/boost/interprocess/mapped_region.hpp
==============================================================================
--- trunk/boost/interprocess/mapped_region.hpp (original)
+++ trunk/boost/interprocess/mapped_region.hpp 2011-12-30 04:00:54 EST (Fri, 30 Dec 2011)
@@ -489,8 +489,8 @@
    }
 
    //We calculate the difference between demanded and valid offset
- std::size_t page_size = this->get_page_size();
- offset_t extra_offset = offset - (offset / page_size) * page_size;
+ const std::size_t page_size = this->get_page_size();
+ const offset_t extra_offset = offset - (offset / page_size) * page_size;
 
 
    //Update the mapping address

Modified: trunk/boost/interprocess/mem_algo/detail/multi_simple_seq_fit_impl.hpp
==============================================================================
--- trunk/boost/interprocess/mem_algo/detail/multi_simple_seq_fit_impl.hpp (original)
+++ trunk/boost/interprocess/mem_algo/detail/multi_simple_seq_fit_impl.hpp 2011-12-30 04:00:54 EST (Fri, 30 Dec 2011)
@@ -18,7 +18,7 @@
 #include <boost/interprocess/detail/config_begin.hpp>
 #include <boost/interprocess/detail/workaround.hpp>
 
-#include <boost/pointer_to_other.hpp>
+#include <boost/intrusive/pointer_traits.hpp>
 
 #include <boost/interprocess/interprocess_fwd.hpp>
 #include <boost/interprocess/containers/allocation_type.hpp>
@@ -75,8 +75,9 @@
 
    private:
    struct block_ctrl;
- typedef typename boost::
- pointer_to_other<void_pointer, block_ctrl>::type block_ctrl_ptr;
+ typedef typename boost::intrusive::
+ pointer_traits<void_pointer>::template
+ rebind_pointer<block_ctrl>::type block_ctrl_ptr;
 
    /*!Block control structure*/
    struct block_ctrl

Modified: trunk/boost/interprocess/mem_algo/detail/simple_seq_fit_impl.hpp
==============================================================================
--- trunk/boost/interprocess/mem_algo/detail/simple_seq_fit_impl.hpp (original)
+++ trunk/boost/interprocess/mem_algo/detail/simple_seq_fit_impl.hpp 2011-12-30 04:00:54 EST (Fri, 30 Dec 2011)
@@ -18,7 +18,7 @@
 #include <boost/interprocess/detail/config_begin.hpp>
 #include <boost/interprocess/detail/workaround.hpp>
 
-#include <boost/pointer_to_other.hpp>
+#include <boost/intrusive/pointer_traits.hpp>
 
 #include <boost/interprocess/interprocess_fwd.hpp>
 #include <boost/interprocess/containers/allocation_type.hpp>
@@ -61,7 +61,9 @@
    simple_seq_fit_impl(const simple_seq_fit_impl &);
    simple_seq_fit_impl &operator=(const simple_seq_fit_impl &);
    
- typedef typename boost::pointer_to_other<VoidPointer, char>::type char_ptr;
+ typedef typename boost::intrusive::
+ pointer_traits<VoidPointer>::template
+ rebind_pointer<char>::type char_ptr;
 
    public:
 
@@ -78,8 +80,9 @@
 
    private:
    class block_ctrl;
- typedef typename boost::
- pointer_to_other<void_pointer, block_ctrl>::type block_ctrl_ptr;
+ typedef typename boost::intrusive::
+ pointer_traits<VoidPointer>::template
+ rebind_pointer<block_ctrl>::type block_ctrl_ptr;
 
    class block_ctrl;
    friend class block_ctrl;

Modified: trunk/boost/interprocess/mem_algo/rbtree_best_fit.hpp
==============================================================================
--- trunk/boost/interprocess/mem_algo/rbtree_best_fit.hpp (original)
+++ trunk/boost/interprocess/mem_algo/rbtree_best_fit.hpp 2011-12-30 04:00:54 EST (Fri, 30 Dec 2011)
@@ -18,7 +18,7 @@
 #include <boost/interprocess/detail/config_begin.hpp>
 #include <boost/interprocess/detail/workaround.hpp>
 
-#include <boost/pointer_to_other.hpp>
+#include <boost/intrusive/pointer_traits.hpp>
 
 #include <boost/interprocess/interprocess_fwd.hpp>
 #include <boost/interprocess/mem_algo/detail/mem_algo_common.hpp>
@@ -73,10 +73,13 @@
 
    private:
    struct block_ctrl;
- typedef typename boost::
- pointer_to_other<VoidPointer, block_ctrl>::type block_ctrl_ptr;
- typedef typename boost::
- pointer_to_other<VoidPointer, char>::type char_ptr;
+ typedef typename boost::intrusive::
+ pointer_traits<VoidPointer>::template
+ rebind_pointer<block_ctrl>::type block_ctrl_ptr;
+
+ typedef typename boost::intrusive::
+ pointer_traits<VoidPointer>::template
+ rebind_pointer<char>::type char_ptr;
 
    /// @endcond
 

Modified: trunk/boost/interprocess/offset_ptr.hpp
==============================================================================
--- trunk/boost/interprocess/offset_ptr.hpp (original)
+++ trunk/boost/interprocess/offset_ptr.hpp 2011-12-30 04:00:54 EST (Fri, 30 Dec 2011)
@@ -510,11 +510,14 @@
 template<class T, class U>
 struct pointer_to_other;
 
+
+
 //Backwards compatibility with pointer_to_other
-template<class T, class T2, class T3, std::size_t A, class U>
-struct pointer_to_other< ::boost::interprocess::offset_ptr<T, T2, T3, A>, U >
+template <class PointedType, class DifferenceType, class OffsetType, std::size_t OffsetAlignment, class U>
+struct pointer_to_other
+ < ::boost::interprocess::offset_ptr<PointedType, DifferenceType, OffsetType, OffsetAlignment>, U >
 {
- typedef ::boost::interprocess::offset_ptr<U, T2, T3, A> type;
+ typedef ::boost::interprocess::offset_ptr<U, DifferenceType, OffsetType, OffsetAlignment> type;
 };
 
 } //namespace boost{

Modified: trunk/boost/interprocess/smart_ptr/deleter.hpp
==============================================================================
--- trunk/boost/interprocess/smart_ptr/deleter.hpp (original)
+++ trunk/boost/interprocess/smart_ptr/deleter.hpp 2011-12-30 04:00:54 EST (Fri, 30 Dec 2011)
@@ -20,7 +20,7 @@
 #include <boost/interprocess/detail/config_begin.hpp>
 #include <boost/interprocess/interprocess_fwd.hpp>
 #include <boost/interprocess/detail/utilities.hpp>
-#include <boost/pointer_to_other.hpp>
+#include <boost/intrusive/pointer_traits.hpp>
 
 //!\file
 //!Describes the functor to delete objects from the segment.
@@ -36,12 +36,14 @@
 class deleter
 {
    public:
- typedef typename boost::pointer_to_other
- <typename SegmentManager::void_pointer, T>::type pointer;
+ typedef typename boost::intrusive::
+ pointer_traits<typename SegmentManager::void_pointer>::template
+ rebind_pointer<T>::type pointer;
 
    private:
- typedef typename boost::pointer_to_other
- <pointer, SegmentManager>::type segment_manager_pointer;
+ typedef typename boost::intrusive::
+ pointer_traits<pointer>::template
+ rebind_pointer<SegmentManager>::type segment_manager_pointer;
 
    segment_manager_pointer mp_mngr;
 

Modified: trunk/boost/interprocess/smart_ptr/detail/shared_count.hpp
==============================================================================
--- trunk/boost/interprocess/smart_ptr/detail/shared_count.hpp (original)
+++ trunk/boost/interprocess/smart_ptr/detail/shared_count.hpp 2011-12-30 04:00:54 EST (Fri, 30 Dec 2011)
@@ -24,7 +24,7 @@
 #include <boost/interprocess/detail/workaround.hpp>
 
 #include <boost/checked_delete.hpp>
-#include <boost/pointer_to_other.hpp>
+#include <boost/intrusive/pointer_traits.hpp>
 #include <boost/interprocess/smart_ptr/detail/bad_weak_ptr.hpp>
 #include <boost/interprocess/smart_ptr/detail/sp_counted_impl.hpp>
 #include <boost/interprocess/detail/utilities.hpp>
@@ -42,21 +42,29 @@
 class shared_count
 {
    public:
- typedef typename boost::pointer_to_other
- <typename VoidAllocator::pointer, T>::type pointer;
+ typedef typename boost::intrusive::
+ pointer_traits<typename VoidAllocator::pointer>::template
+ rebind_pointer<T>::type pointer;
 
    private:
    typedef sp_counted_impl_pd<VoidAllocator, Deleter> counted_impl;
- typedef typename boost::pointer_to_other
- <typename VoidAllocator::pointer, counted_impl>::type counted_impl_ptr;
- typedef typename boost::pointer_to_other
- <typename VoidAllocator::pointer, sp_counted_base>::type counted_base_ptr;
+
+ typedef typename boost::intrusive::
+ pointer_traits<typename VoidAllocator::pointer>::template
+ rebind_pointer<counted_impl>::type counted_impl_ptr;
+ typedef typename boost::intrusive::
+ pointer_traits<typename VoidAllocator::pointer>::template
+ rebind_pointer<sp_counted_base>::type counted_base_ptr;
    typedef typename VoidAllocator::template rebind
       <counted_impl>::other counted_impl_allocator;
- typedef typename boost::pointer_to_other
- <typename VoidAllocator::pointer, const Deleter>::type const_deleter_pointer;
- typedef typename boost::pointer_to_other
- <typename VoidAllocator::pointer, const VoidAllocator>::type const_allocator_pointer;
+
+ typedef typename boost::intrusive::
+ pointer_traits<typename VoidAllocator::pointer>::template
+ rebind_pointer<const Deleter>::type const_deleter_pointer;
+
+ typedef typename boost::intrusive::
+ pointer_traits<typename VoidAllocator::pointer>::template
+ rebind_pointer<const VoidAllocator>::type const_allocator_pointer;
 
    pointer m_px;
    counted_impl_ptr m_pi;
@@ -213,15 +221,20 @@
 class weak_count
 {
    public:
- typedef typename boost::pointer_to_other
- <typename VoidAllocator::pointer, T>::type pointer;
+ typedef typename boost::intrusive::
+ pointer_traits<typename VoidAllocator::pointer>::template
+ rebind_pointer<T>::type pointer;
 
    private:
- typedef sp_counted_impl_pd<VoidAllocator, Deleter> counted_impl;
- typedef typename boost::pointer_to_other
- <typename VoidAllocator::pointer, counted_impl>::type counted_impl_ptr;
- typedef typename boost::pointer_to_other
- <typename VoidAllocator::pointer, sp_counted_base>::type counted_base_ptr;
+
+ typedef sp_counted_impl_pd<VoidAllocator, Deleter> counted_impl;
+
+ typedef typename boost::intrusive::
+ pointer_traits<typename VoidAllocator::pointer>::template
+ rebind_pointer<counted_impl>::type counted_impl_ptr;
+ typedef typename boost::intrusive::
+ pointer_traits<typename VoidAllocator::pointer>::template
+ rebind_pointer<sp_counted_base>::type counted_base_ptr;
 
    pointer m_px;
    counted_impl_ptr m_pi;

Modified: trunk/boost/interprocess/smart_ptr/detail/sp_counted_impl.hpp
==============================================================================
--- trunk/boost/interprocess/smart_ptr/detail/sp_counted_impl.hpp (original)
+++ trunk/boost/interprocess/smart_ptr/detail/sp_counted_impl.hpp 2011-12-30 04:00:54 EST (Fri, 30 Dec 2011)
@@ -26,7 +26,7 @@
 #include <boost/interprocess/smart_ptr/detail/sp_counted_base.hpp>
 #include <boost/interprocess/smart_ptr/scoped_ptr.hpp>
 #include <boost/interprocess/detail/utilities.hpp>
-#include <boost/pointer_to_other.hpp>
+#include <boost/intrusive/pointer_traits.hpp>
 
 namespace boost {
 
@@ -79,11 +79,12 @@
    sp_counted_impl_pd( sp_counted_impl_pd const & );
    sp_counted_impl_pd & operator= ( sp_counted_impl_pd const & );
 
- typedef typename boost::pointer_to_other
- <typename A::pointer, const D>::type const_deleter_pointer;
-
- typedef typename boost::pointer_to_other
- <typename A::pointer, const A>::type const_allocator_pointer;
+ typedef typename boost::intrusive::
+ pointer_traits<typename A::pointer>::template
+ rebind_pointer<const D>::type const_deleter_pointer;
+ typedef typename boost::intrusive::
+ pointer_traits<typename A::pointer>::template
+ rebind_pointer<const A>::type const_allocator_pointer;
 
    typedef typename D::pointer pointer;
    pointer m_ptr;

Modified: trunk/boost/interprocess/smart_ptr/intrusive_ptr.hpp
==============================================================================
--- trunk/boost/interprocess/smart_ptr/intrusive_ptr.hpp (original)
+++ trunk/boost/interprocess/smart_ptr/intrusive_ptr.hpp 2011-12-30 04:00:54 EST (Fri, 30 Dec 2011)
@@ -22,7 +22,7 @@
 
 #include <boost/assert.hpp>
 #include <boost/interprocess/detail/utilities.hpp>
-#include <boost/pointer_to_other.hpp>
+#include <boost/intrusive/pointer_traits.hpp>
 
 #include <functional> // for std::less
 #include <iosfwd> // for std::basic_ostream
@@ -50,7 +50,9 @@
 {
    public:
    //!Provides the type of the internal stored pointer.
- typedef typename boost::pointer_to_other<VoidPointer, T>::type pointer;
+ typedef typename boost::intrusive::
+ pointer_traits<VoidPointer>::template
+ rebind_pointer<T>::type pointer;
    //!Provides the type of the stored pointer.
    typedef T element_type;
 

Modified: trunk/boost/interprocess/smart_ptr/scoped_ptr.hpp
==============================================================================
--- trunk/boost/interprocess/smart_ptr/scoped_ptr.hpp (original)
+++ trunk/boost/interprocess/smart_ptr/scoped_ptr.hpp 2011-12-30 04:00:54 EST (Fri, 30 Dec 2011)
@@ -20,7 +20,6 @@
 #include <boost/interprocess/detail/pointer_type.hpp>
 #include <boost/interprocess/detail/utilities.hpp>
 #include <boost/assert.hpp>
-#include <boost/pointer_to_other.hpp>
 
 //!\file
 //!Describes the smart pointer scoped_ptr
@@ -55,10 +54,6 @@
    typedef Deleter deleter_type;
    typedef typename ipcdetail::pointer_type<T, Deleter>::type pointer;
 
- //!Provides the type of the internal stored pointer
-// typedef typename boost::pointer_to_other
-// <typename Deleter::pointer, T>::type pointer;
-
    //!Constructs a scoped_ptr, storing a copy of p(which can be 0) and d.
    //!Does not throw.
    explicit scoped_ptr(const pointer &p = 0, const Deleter &d = Deleter())

Modified: trunk/boost/interprocess/smart_ptr/shared_ptr.hpp
==============================================================================
--- trunk/boost/interprocess/smart_ptr/shared_ptr.hpp (original)
+++ trunk/boost/interprocess/smart_ptr/shared_ptr.hpp 2011-12-30 04:00:54 EST (Fri, 30 Dec 2011)
@@ -29,7 +29,7 @@
 #include <boost/interprocess/allocators/allocator.hpp>
 #include <boost/interprocess/smart_ptr/deleter.hpp>
 #include <boost/static_assert.hpp>
-#include <boost/pointer_to_other.hpp>
+#include <boost/intrusive/pointer_traits.hpp>
 
 #include <algorithm> // for std::swap
 #include <functional> // for std::less
@@ -97,16 +97,19 @@
 
    typedef T element_type;
    typedef T value_type;
- typedef typename boost::pointer_to_other
- <typename VoidAllocator::pointer, T>::type pointer;
+ typedef typename boost::intrusive::
+ pointer_traits<typename VoidAllocator::pointer>::template
+ rebind_pointer<T>::type pointer;
    typedef typename ipcdetail::add_reference
                      <value_type>::type reference;
    typedef typename ipcdetail::add_reference
                      <const value_type>::type const_reference;
- typedef typename boost::pointer_to_other
- <typename VoidAllocator::pointer, const Deleter>::type const_deleter_pointer;
- typedef typename boost::pointer_to_other
- <typename VoidAllocator::pointer, const VoidAllocator>::type const_allocator_pointer;
+ typedef typename boost::intrusive::
+ pointer_traits<typename VoidAllocator::pointer>::template
+ rebind_pointer<const Deleter>::type const_deleter_pointer;
+ typedef typename boost::intrusive::
+ pointer_traits<typename VoidAllocator::pointer>::template
+ rebind_pointer<const VoidAllocator>::type const_allocator_pointer;
 
    BOOST_COPYABLE_AND_MOVABLE(shared_ptr)
    public:
@@ -125,7 +128,10 @@
    {
       //Check that the pointer passed is of the same type that
       //the pointer the allocator defines or it's a raw pointer
- typedef typename boost::pointer_to_other<pointer, T>::type ParameterPointer;
+ typedef typename boost::intrusive::
+ pointer_traits<pointer>::template
+ rebind_pointer<T>::type ParameterPointer;
+
       BOOST_STATIC_ASSERT((ipcdetail::is_same<pointer, ParameterPointer>::value) ||
                           (ipcdetail::is_pointer<pointer>::value));
       ipcdetail::sp_enable_shared_from_this<T, VoidAllocator, Deleter>( m_pn, ipcdetail::to_raw_pointer(p), ipcdetail::to_raw_pointer(p) );
@@ -223,7 +229,9 @@
    {
       //Check that the pointer passed is of the same type that
       //the pointer the allocator defines or it's a raw pointer
- typedef typename boost::pointer_to_other<Pointer, T>::type ParameterPointer;
+ typedef typename boost::intrusive::
+ pointer_traits<Pointer>::template
+ rebind_pointer<T>::type ParameterPointer;
       BOOST_STATIC_ASSERT((ipcdetail::is_same<pointer, ParameterPointer>::value) ||
                           (ipcdetail::is_pointer<Pointer>::value));
       this_type(p, a, d).swap(*this);

Modified: trunk/boost/interprocess/smart_ptr/weak_ptr.hpp
==============================================================================
--- trunk/boost/interprocess/smart_ptr/weak_ptr.hpp (original)
+++ trunk/boost/interprocess/smart_ptr/weak_ptr.hpp 2011-12-30 04:00:54 EST (Fri, 30 Dec 2011)
@@ -22,7 +22,7 @@
 #include <boost/detail/no_exceptions_support.hpp>
 #include <boost/interprocess/allocators/allocator.hpp>
 #include <boost/interprocess/smart_ptr/deleter.hpp>
-#include <boost/pointer_to_other.hpp>
+#include <boost/intrusive/pointer_traits.hpp>
 
 //!\file
 //!Describes the smart pointer weak_ptr.
@@ -54,8 +54,9 @@
    private:
    // Borland 5.5.1 specific workarounds
    typedef weak_ptr<T, A, D> this_type;
- typedef typename boost::pointer_to_other
- <typename A::pointer, T>::type pointer;
+ typedef typename boost::intrusive::
+ pointer_traits<typename A::pointer>::template
+ rebind_pointer<T>::type pointer;
    typedef typename ipcdetail::add_reference
                      <T>::type reference;
    typedef typename ipcdetail::add_reference


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