$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r76247 - in branches/release: boost/container boost/container/allocator boost/container/detail boost/interprocess boost/interprocess/allocators boost/interprocess/allocators/detail boost/interprocess/detail boost/interprocess/ipc boost/interprocess/mem_algo boost/interprocess/mem_algo/detail boost/interprocess/smart_ptr boost/interprocess/smart_ptr/detail boost/intrusive boost/intrusive/detail libs/container/doc libs/container/test libs/interprocess libs/interprocess/test libs/intrusive libs/intrusive/test
From: igaztanaga_at_[hidden]
Date: 2011-12-31 11:19:19
Author: igaztanaga
Date: 2011-12-31 11:19:15 EST (Sat, 31 Dec 2011)
New Revision: 76247
URL: http://svn.boost.org/trac/boost/changeset/76247
Log:
Merging into release branch for 1.49
Properties modified: 
   branches/release/boost/intrusive/   (props changed)
   branches/release/libs/interprocess/   (props changed)
   branches/release/libs/intrusive/   (props changed)
Text files modified: 
   branches/release/boost/container/allocator/allocator_traits.hpp                   |    17 +++++----                               
   branches/release/boost/container/detail/flat_tree.hpp                             |    48 +++++++++------------------             
   branches/release/boost/container/detail/mpl.hpp                                   |     4 ++                                      
   branches/release/boost/container/detail/tree.hpp                                  |    26 ++++++++-------                         
   branches/release/boost/container/flat_map.hpp                                     |    50 +++++++++++++++-------------            
   branches/release/boost/container/flat_set.hpp                                     |    23 +++++++------                           
   branches/release/boost/container/map.hpp                                          |    25 +++++++-------                          
   branches/release/boost/container/set.hpp                                          |    38 +++++++++++++--------                   
   branches/release/boost/container/slist.hpp                                        |     9 +++-                                    
   branches/release/boost/container/stable_vector.hpp                                |    19 +++++-----                              
   branches/release/boost/container/vector.hpp                                       |    18 +++++-----                              
   branches/release/boost/interprocess/allocators/adaptive_pool.hpp                  |    12 ++++--                                  
   branches/release/boost/interprocess/allocators/allocator.hpp                      |    23 +++++++-----                            
   branches/release/boost/interprocess/allocators/detail/adaptive_node_pool.hpp      |     1                                         
   branches/release/boost/interprocess/allocators/detail/allocator_common.hpp        |    37 ++++++++++++--------                    
   branches/release/boost/interprocess/allocators/detail/node_pool.hpp               |     1                                         
   branches/release/boost/interprocess/allocators/node_allocator.hpp                 |    12 ++++--                                  
   branches/release/boost/interprocess/allocators/private_adaptive_pool.hpp          |    12 ++++--                                  
   branches/release/boost/interprocess/allocators/private_node_allocator.hpp         |    13 ++++--                                  
   branches/release/boost/interprocess/detail/segment_manager_helper.hpp             |     7 ++-                                     
   branches/release/boost/interprocess/ipc/message_queue.hpp                         |    30 +++++++++++------                       
   branches/release/boost/interprocess/mapped_region.hpp                             |     4 +-                                      
   branches/release/boost/interprocess/mem_algo/detail/multi_simple_seq_fit_impl.hpp |     7 ++-                                     
   branches/release/boost/interprocess/mem_algo/detail/simple_seq_fit_impl.hpp       |    11 ++++--                                  
   branches/release/boost/interprocess/mem_algo/rbtree_best_fit.hpp                  |    13 ++++--                                  
   branches/release/boost/interprocess/offset_ptr.hpp                                |     9 +++-                                    
   branches/release/boost/interprocess/smart_ptr/deleter.hpp                         |    12 ++++--                                  
   branches/release/boost/interprocess/smart_ptr/detail/shared_count.hpp             |    49 ++++++++++++++++++----------            
   branches/release/boost/interprocess/smart_ptr/detail/sp_counted_impl.hpp          |    13 ++++---                                 
   branches/release/boost/interprocess/smart_ptr/intrusive_ptr.hpp                   |     6 ++-                                     
   branches/release/boost/interprocess/smart_ptr/scoped_ptr.hpp                      |     5 --                                      
   branches/release/boost/interprocess/smart_ptr/shared_ptr.hpp                      |    26 ++++++++++-----                         
   branches/release/boost/interprocess/smart_ptr/weak_ptr.hpp                        |     7 ++-                                     
   branches/release/boost/intrusive/circular_slist_algorithms.hpp                    |     2                                         
   branches/release/boost/intrusive/detail/has_member_function_callable_with.hpp     |    19 +++++++++++                             
   branches/release/boost/intrusive/detail/memory_util.hpp                           |    39 ++++++++++++++++++++--                  
   branches/release/boost/intrusive/detail/utilities.hpp                             |    20 +++++-----                              
   branches/release/boost/intrusive/hashtable.hpp                                    |    13 ++++--                                  
   branches/release/boost/intrusive/linear_slist_algorithms.hpp                      |     2                                         
   branches/release/boost/intrusive/pointer_traits.hpp                               |     4 +-                                      
   branches/release/libs/container/doc/container.qbk                                 |     4 +                                       
   branches/release/libs/container/test/allocator_traits_test.cpp                    |    68 +++++++++++++++++++++++---------------- 
   branches/release/libs/interprocess/test/allocator_v1.hpp                          |    28 ++++++++++------                        
   branches/release/libs/interprocess/test/heap_allocator_v1.hpp                     |    25 ++++++++------                          
   branches/release/libs/intrusive/test/has_member_function_callable_with.cpp        |    22 +++++++++++-                            
   45 files changed, 496 insertions(+), 337 deletions(-)
Modified: branches/release/boost/container/allocator/allocator_traits.hpp
==============================================================================
--- branches/release/boost/container/allocator/allocator_traits.hpp	(original)
+++ branches/release/boost/container/allocator/allocator_traits.hpp	2011-12-31 11:19:15 EST (Sat, 31 Dec 2011)
@@ -26,6 +26,7 @@
 #include <boost/intrusive/pointer_traits.hpp>
 #include <boost/container/allocator/memory_util.hpp>
 #include <boost/type_traits/integral_constant.hpp>
+#include <boost/container/detail/mpl.hpp>
 #include <boost/move/move.hpp>
 #include <limits> //numeric_limits<>::max()
 #include <new>    //placement new
@@ -118,27 +119,27 @@
          pointer, value_type*)
             pointer;
       //const_pointer
-      typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Alloc, 
+      typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(boost::container::container_detail::, Alloc, 
          const_pointer, typename boost::intrusive::pointer_traits<pointer>::template
-            rebind_pointer<const value_type>::type)
+            rebind_pointer<const value_type>)
                const_pointer;
       //reference
       typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Alloc,
-         reference, value_type&)
+         reference, typename container_detail::unvoid<value_type>::type&)
             reference;
       //const_reference
       typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Alloc, 
-         const_reference, const value_type&)
+         const_reference, const typename container_detail::unvoid<value_type>::type&)
                const_reference;
       //void_pointer
-      typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Alloc, 
+      typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(boost::container::container_detail::, Alloc, 
          void_pointer, typename boost::intrusive::pointer_traits<pointer>::template
-            rebind_pointer<void>::type)
+            rebind_pointer<void>)
                void_pointer;
       //const_void_pointer
-      typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Alloc,
+      typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(boost::container::container_detail::, Alloc,
          const_void_pointer, typename boost::intrusive::pointer_traits<pointer>::template
-            rebind_pointer<const void>::type)
+            rebind_pointer<const void>)
                const_void_pointer;
       //difference_type
       typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Alloc,
Modified: branches/release/boost/container/detail/flat_tree.hpp
==============================================================================
--- branches/release/boost/container/detail/flat_tree.hpp	(original)
+++ branches/release/boost/container/detail/flat_tree.hpp	2011-12-31 11:19:15 EST (Sat, 31 Dec 2011)
@@ -352,7 +352,7 @@
    #ifdef BOOST_CONTAINER_PERFECT_FORWARDING
 
    template <class... Args>
-   iterator emplace_unique(Args&&... args)
+   std::pair<iterator, bool> emplace_unique(Args&&... args)
    {
       value_type && val = value_type(boost::forward<Args>(args)...);
       insert_commit_data data;
@@ -361,7 +361,7 @@
       if(ret.second){
          ret.first = priv_insert_commit(data, boost::move(val));
       }
-      return ret.first;
+      return ret;
    }
 
    template <class... Args>
@@ -398,27 +398,28 @@
 
    #define BOOST_PP_LOCAL_MACRO(n)                                                        \
    BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >) \
-   iterator emplace_unique(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _))           \
+   std::pair<iterator, bool>                                                              \
+      emplace_unique(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _))                  \
    {                                                                                      \
-      BOOST_PP_EXPR_IF(BOOST_PP_NOT(n), container_detail::value_init<) value_type        \
+      BOOST_PP_EXPR_IF(BOOST_PP_NOT(n), container_detail::value_init<) value_type         \
          BOOST_PP_EXPR_IF(BOOST_PP_NOT(n), >) vval BOOST_PP_LPAREN_IF(n)                  \
-            BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _) BOOST_PP_RPAREN_IF(n); \
+            BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _) BOOST_PP_RPAREN_IF(n);  \
       value_type &val = vval;                                                             \
       insert_commit_data data;                                                            \
       std::pair<iterator,bool> ret = priv_insert_unique_prepare(val, data);               \
       if(ret.second){                                                                     \
          ret.first = priv_insert_commit(data, boost::move(val));                          \
       }                                                                                   \
-      return ret.first;                                                                   \
+      return ret;                                                                         \
    }                                                                                      \
                                                                                           \
    BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >) \
    iterator emplace_hint_unique(const_iterator hint                                       \
-                        BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _))     \
+                        BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _))      \
    {                                                                                      \
-      BOOST_PP_EXPR_IF(BOOST_PP_NOT(n), container_detail::value_init<) value_type        \
+      BOOST_PP_EXPR_IF(BOOST_PP_NOT(n), container_detail::value_init<) value_type         \
          BOOST_PP_EXPR_IF(BOOST_PP_NOT(n), >) vval BOOST_PP_LPAREN_IF(n)                  \
-            BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _) BOOST_PP_RPAREN_IF(n); \
+            BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _) BOOST_PP_RPAREN_IF(n);  \
       value_type &val = vval;                                                             \
       insert_commit_data data;                                                            \
       std::pair<iterator,bool> ret = priv_insert_unique_prepare(hint, val, data);         \
@@ -429,11 +430,11 @@
    }                                                                                      \
                                                                                           \
    BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >) \
-   iterator emplace_equal(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _))            \
+   iterator emplace_equal(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _))             \
    {                                                                                      \
-      BOOST_PP_EXPR_IF(BOOST_PP_NOT(n), container_detail::value_init<) value_type        \
+      BOOST_PP_EXPR_IF(BOOST_PP_NOT(n), container_detail::value_init<) value_type         \
          BOOST_PP_EXPR_IF(BOOST_PP_NOT(n), >) vval BOOST_PP_LPAREN_IF(n)                  \
-            BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _) BOOST_PP_RPAREN_IF(n); \
+            BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _) BOOST_PP_RPAREN_IF(n);  \
       value_type &val = vval;                                                             \
       iterator i = this->upper_bound(KeyOfValue()(val));                                  \
       i = this->m_data.m_vect.insert(i, boost::move(val));                                \
@@ -442,11 +443,11 @@
                                                                                           \
    BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >) \
    iterator emplace_hint_equal(const_iterator hint                                        \
-                      BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _))       \
+                      BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _))        \
    {                                                                                      \
-      BOOST_PP_EXPR_IF(BOOST_PP_NOT(n), container_detail::value_init<) value_type        \
+      BOOST_PP_EXPR_IF(BOOST_PP_NOT(n), container_detail::value_init<) value_type         \
          BOOST_PP_EXPR_IF(BOOST_PP_NOT(n), >) vval BOOST_PP_LPAREN_IF(n)                  \
-            BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _) BOOST_PP_RPAREN_IF(n); \
+            BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _) BOOST_PP_RPAREN_IF(n);  \
       value_type &val = vval;                                                             \
       insert_commit_data data;                                                            \
       priv_insert_equal_prepare(hint, val, data);                                         \
@@ -743,23 +744,6 @@
       for ( ; first != last; ++first)
          this->insert_equal(*first);
    }
-
-/*
-   template <class FwdIt>
-   void priv_insert_unique(FwdIt first, FwdIt last, std::forward_iterator_tag)
-   {
-      size_type len = static_cast<size_type>(std::distance(first, last));
-      this->reserve(this->size()+len);
-      priv_insert_unique(first, last, std::input_iterator_tag());
-   }
-
-   template <class InIt>
-   void priv_insert_unique(InIt first, InIt last, std::input_iterator_tag)
-   {
-      for ( ; first != last; ++first)
-         this->insert_unique(*first);
-   }
-*/
 };
 
 template <class Key, class Value, class KeyOfValue, 
Modified: branches/release/boost/container/detail/mpl.hpp
==============================================================================
--- branches/release/boost/container/detail/mpl.hpp	(original)
+++ branches/release/boost/container/detail/mpl.hpp	2011-12-31 11:19:15 EST (Sat, 31 Dec 2011)
@@ -148,6 +148,10 @@
    static const std::size_t value = 0;
 };
 
+template <typename T> struct unvoid { typedef T type; };
+template <> struct unvoid<void> { struct type { }; };
+template <> struct unvoid<const void> { struct type { }; };
+
 }  //namespace container_detail { 
 }  //namespace container { 
 }  //namespace boost {
Modified: branches/release/boost/container/detail/tree.hpp
==============================================================================
--- branches/release/boost/container/detail/tree.hpp	(original)
+++ branches/release/boost/container/detail/tree.hpp	2011-12-31 11:19:15 EST (Sat, 31 Dec 2011)
@@ -753,7 +753,7 @@
    }
 
    private:
-   iterator emplace_unique_impl(NodePtr p)
+   std::pair<iterator, bool> emplace_unique_impl(NodePtr p)
    {
       value_type &v = p->get_data();
       insert_commit_data data;
@@ -761,9 +761,11 @@
          this->insert_unique_check(KeyOfValue()(v), data);
       if(!ret.second){
          Destroyer(this->node_alloc())(p);
-         return ret.first;
+         return ret;
       }
-      return iterator(iiterator(this->icont().insert_unique_commit(*p, data)));
+      return std::pair<iterator,bool>
+         ( iterator(iiterator(this->icont().insert_unique_commit(*p, data)))
+         , true );
    }
 
    iterator emplace_unique_hint_impl(const_iterator hint, NodePtr p)
@@ -784,7 +786,7 @@
    #ifdef BOOST_CONTAINER_PERFECT_FORWARDING
 
    template <class... Args>
-   iterator emplace_unique(Args&&... args)
+   std::pair<iterator, bool> emplace_unique(Args&&... args)
    {  return this->emplace_unique_impl(AllocHolder::create_node(boost::forward<Args>(args)...));   }
 
    template <class... Args>
@@ -809,32 +811,32 @@
 
    #define BOOST_PP_LOCAL_MACRO(n)                                                                          \
    BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >)                   \
-   iterator emplace_unique(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _))                             \
+   std::pair<iterator, bool> emplace_unique(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _))             \
    {                                                                                                        \
       return this->emplace_unique_impl                                                                      \
-         (AllocHolder::create_node(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)));                \
+         (AllocHolder::create_node(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)));                 \
    }                                                                                                        \
                                                                                                             \
    BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >)                   \
    iterator emplace_hint_unique(const_iterator hint                                                         \
-                       BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _))                        \
+                       BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _))                         \
    {                                                                                                        \
       return this->emplace_unique_hint_impl                                                                 \
-         (hint, AllocHolder::create_node(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)));          \
+         (hint, AllocHolder::create_node(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)));           \
    }                                                                                                        \
                                                                                                             \
    BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >)                   \
-   iterator emplace_equal(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _))                              \
+   iterator emplace_equal(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _))                               \
    {                                                                                                        \
-      NodePtr p(AllocHolder::create_node(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)));          \
+      NodePtr p(AllocHolder::create_node(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)));           \
       return iterator(this->icont().insert_equal(this->icont().end(), *p));                                 \
    }                                                                                                        \
                                                                                                             \
    BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >)                   \
    iterator emplace_hint_equal(const_iterator hint                                                          \
-                       BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _))                        \
+                       BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _))                         \
    {                                                                                                        \
-      NodePtr p(AllocHolder::create_node(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)));          \
+      NodePtr p(AllocHolder::create_node(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)));           \
       return iterator(this->icont().insert_equal(hint.get(), *p));                                          \
    }                                                                                                        \
    //!
Modified: branches/release/boost/container/flat_map.hpp
==============================================================================
--- branches/release/boost/container/flat_map.hpp	(original)
+++ branches/release/boost/container/flat_map.hpp	2011-12-31 11:19:15 EST (Sat, 31 Dec 2011)
@@ -515,8 +515,8 @@
    //!
    //! <b>Note</b>: If an element is inserted it might invalidate elements.
    iterator insert(const_iterator position, BOOST_RV_REF(value_type) x)
-      { return container_detail::force_copy<iterator>(
-         m_flat_tree.insert_unique(container_detail::force<impl_const_iterator>(position), boost::move(container_detail::force<impl_value_type>(x)))); }
+      { return container_detail::force_copy<iterator>
+         (m_flat_tree.insert_unique(container_detail::force<impl_const_iterator>(position), boost::move(container_detail::force<impl_value_type>(x)))); }
 
    //! <b>Effects</b>: Inserts an element move constructed from x in the container.
    //!   p is a hint pointing to where the insert should start to search.
@@ -548,7 +548,7 @@
 
    #if defined(BOOST_CONTAINER_PERFECT_FORWARDING) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
 
-   //! <b>Effects</b>: Inserts an object of type T constructed with
+   //! <b>Effects</b>: Inserts an object x of type T constructed with
    //!   std::forward<Args>(args)... if and only if there is no element in the container 
    //!   with key equivalent to the key of x.
    //!
@@ -561,8 +561,8 @@
    //!
    //! <b>Note</b>: If an element is inserted it might invalidate elements.
    template <class... Args>
-   iterator emplace(Args&&... args)
-   {  return container_detail::force_copy<iterator>(m_flat_tree.emplace_unique(boost::forward<Args>(args)...)); }
+   std::pair<iterator,bool> emplace(Args&&... args)
+   {  return container_detail::force_copy< std::pair<iterator, bool> >(m_flat_tree.emplace_unique(boost::forward<Args>(args)...)); }
 
    //! <b>Effects</b>: Inserts an object of type T constructed with
    //!   std::forward<Args>(args)... in the container if and only if there is 
@@ -578,22 +578,23 @@
    //! <b>Note</b>: If an element is inserted it might invalidate elements.
    template <class... Args>
    iterator emplace_hint(const_iterator hint, Args&&... args)
-   {  return container_detail::force_copy<iterator>(m_flat_tree.emplace_hint_unique(container_detail::force<impl_const_iterator>(hint), boost::forward<Args>(args)...)); }
+   {  return container_detail::force_copy<iterator>
+      (m_flat_tree.emplace_hint_unique(container_detail::force<impl_const_iterator>(hint), boost::forward<Args>(args)...)); }
 
    #else //#ifdef BOOST_CONTAINER_PERFECT_FORWARDING
 
    #define BOOST_PP_LOCAL_MACRO(n)                                                                 \
    BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >)          \
-   iterator emplace(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _))                           \
-   {  return container_detail::force_copy<iterator>(m_flat_tree.emplace_unique                                       \
-               (BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _))); }                        \
+   std::pair<iterator,bool> emplace(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _))            \
+   {  return container_detail::force_copy< std::pair<iterator, bool> >                             \
+         (m_flat_tree.emplace_unique(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _))); }    \
                                                                                                    \
    BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >)          \
    iterator emplace_hint(const_iterator hint                                                       \
-                         BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _))             \
-   {  return container_detail::force_copy<iterator>(m_flat_tree.emplace_hint_unique                                  \
-            (container_detail::force<impl_const_iterator>(hint)                                                      \
-               BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _))); }                \
+                         BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _))              \
+   {  return container_detail::force_copy<iterator>(m_flat_tree.emplace_hint_unique                \
+            (container_detail::force<impl_const_iterator>(hint)                                    \
+               BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _))); }                 \
    //!
    #define BOOST_PP_LOCAL_LIMITS (0, BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS)
    #include BOOST_PP_LOCAL_ITERATE()
@@ -631,7 +632,8 @@
    //! <b>Complexity</b>: Logarithmic search time plus erasure time
    //!   linear to the elements with bigger keys.
    iterator erase(const_iterator first, const_iterator last)
-      { return container_detail::force_copy<iterator>(m_flat_tree.erase(container_detail::force<impl_const_iterator>(first), container_detail::force<impl_const_iterator>(last))); }
+      { return container_detail::force_copy<iterator>
+         (m_flat_tree.erase(container_detail::force<impl_const_iterator>(first), container_detail::force<impl_const_iterator>(last))); }
 
    //! <b>Effects</b>: erase(a.begin(),a.end()).
    //!
@@ -1151,7 +1153,8 @@
    //!
    //! <b>Note</b>: If an element is inserted it might invalidate elements.
    iterator insert(const_iterator position, const value_type& x) 
-      { return container_detail::force_copy<iterator>(m_flat_tree.insert_equal(container_detail::force<impl_const_iterator>(position), container_detail::force<impl_value_type>(x))); }
+      { return container_detail::force_copy<iterator>
+         (m_flat_tree.insert_equal(container_detail::force<impl_const_iterator>(position), container_detail::force<impl_value_type>(x))); }
 
    //! <b>Effects</b>: Inserts a value move constructed from x in the container.
    //!   p is a hint pointing to where the insert should start to search.
@@ -1237,16 +1240,16 @@
 
    #define BOOST_PP_LOCAL_MACRO(n)                                                                 \
    BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >)          \
-   iterator emplace(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _))                           \
-   {  return container_detail::force_copy<iterator>(m_flat_tree.emplace_equal                                        \
-               (BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _))); }                        \
+   iterator emplace(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _))                            \
+   {  return container_detail::force_copy<iterator>(m_flat_tree.emplace_equal                      \
+               (BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _))); }                         \
                                                                                                    \
    BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >)          \
    iterator emplace_hint(const_iterator hint                                                       \
-                         BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _))             \
-   {  return container_detail::force_copy<iterator>(m_flat_tree.emplace_hint_equal                                   \
-            (container_detail::force<impl_const_iterator>(hint)                                                      \
-               BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _))); }                \
+                         BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _))              \
+   {  return container_detail::force_copy<iterator>(m_flat_tree.emplace_hint_equal                 \
+            (container_detail::force<impl_const_iterator>(hint)                                    \
+               BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _))); }                 \
    //!
    #define BOOST_PP_LOCAL_LIMITS (0, BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS)
    #include BOOST_PP_LOCAL_ITERATE()
@@ -1284,7 +1287,8 @@
    //! <b>Complexity</b>: Logarithmic search time plus erasure time
    //!   linear to the elements with bigger keys.
    iterator erase(const_iterator first, const_iterator last)
-      { return container_detail::force_copy<iterator>(m_flat_tree.erase(container_detail::force<impl_const_iterator>(first), container_detail::force<impl_const_iterator>(last))); }
+      { return container_detail::force_copy<iterator>
+         (m_flat_tree.erase(container_detail::force<impl_const_iterator>(first), container_detail::force<impl_const_iterator>(last))); }
 
    //! <b>Effects</b>: erase(a.begin(),a.end()).
    //!
Modified: branches/release/boost/container/flat_set.hpp
==============================================================================
--- branches/release/boost/container/flat_set.hpp	(original)
+++ branches/release/boost/container/flat_set.hpp	2011-12-31 11:19:15 EST (Sat, 31 Dec 2011)
@@ -418,7 +418,7 @@
 
    #if defined(BOOST_CONTAINER_PERFECT_FORWARDING) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
 
-   //! <b>Effects</b>: Inserts an object of type T constructed with
+   //! <b>Effects</b>: Inserts an object x of type T constructed with
    //!   std::forward<Args>(args)... if and only if there is no element in the container 
    //!   with key equivalent to the key of x.
    //!
@@ -431,7 +431,7 @@
    //!
    //! <b>Note</b>: If an element is inserted it might invalidate elements.
    template <class... Args>
-   iterator emplace(Args&&... args)
+   std::pair<iterator,bool> emplace(Args&&... args)
    {  return m_flat_tree.emplace_unique(boost::forward<Args>(args)...); }
 
    //! <b>Effects</b>: Inserts an object of type T constructed with
@@ -454,14 +454,14 @@
 
    #define BOOST_PP_LOCAL_MACRO(n)                                                                 \
    BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >)          \
-   iterator emplace(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _))                           \
-   {  return m_flat_tree.emplace_unique(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)); } \
+   std::pair<iterator,bool> emplace(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _))            \
+   {  return m_flat_tree.emplace_unique(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)); }  \
                                                                                                    \
    BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >)          \
    iterator emplace_hint(const_iterator hint                                                       \
-                         BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _))             \
+                         BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _))              \
    {  return m_flat_tree.emplace_hint_unique                                                       \
-            (hint BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)); }              \
+            (hint BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)); }               \
    //!
    #define BOOST_PP_LOCAL_LIMITS (0, BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS)
    #include BOOST_PP_LOCAL_ITERATE()
@@ -982,7 +982,8 @@
    { return this->insert(position, const_cast<const T &>(x)); }
 
    template<class U>
-   iterator insert(const_iterator position, const U &u, typename container_detail::enable_if_c<container_detail::is_same<T, U>::value && !::boost::has_move_emulation_enabled<U>::value >::type* =0)
+   iterator insert( const_iterator position, const U &u
+                  , typename container_detail::enable_if_c<container_detail::is_same<T, U>::value && !::boost::has_move_emulation_enabled<U>::value >::type* =0)
    {  return priv_insert(position, u); }
    #endif
 
@@ -1044,14 +1045,14 @@
 
    #define BOOST_PP_LOCAL_MACRO(n)                                                                 \
    BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >)          \
-   iterator emplace(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _))                           \
-   {  return m_flat_tree.emplace_equal(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)); }  \
+   iterator emplace(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _))                            \
+   {  return m_flat_tree.emplace_equal(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)); }   \
                                                                                                    \
    BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >)          \
    iterator emplace_hint(const_iterator hint                                                       \
-                         BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _))             \
+                         BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _))              \
    {  return m_flat_tree.emplace_hint_equal                                                        \
-            (hint BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)); }              \
+            (hint BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)); }               \
    //!
    #define BOOST_PP_LOCAL_LIMITS (0, BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS)
    #include BOOST_PP_LOCAL_ITERATE()
Modified: branches/release/boost/container/map.hpp
==============================================================================
--- branches/release/boost/container/map.hpp	(original)
+++ branches/release/boost/container/map.hpp	2011-12-31 11:19:15 EST (Sat, 31 Dec 2011)
@@ -504,18 +504,19 @@
 
    #if defined(BOOST_CONTAINER_PERFECT_FORWARDING) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
 
-   //! <b>Effects</b>: Inserts an object of type T constructed with
+   //! <b>Effects</b>: Inserts an object x of type T constructed with
    //!   std::forward<Args>(args)... in the container if and only if there is 
    //!   no element in the container with an equivalent key.
    //!   p is a hint pointing to where the insert should start to search.
    //!
-   //! <b>Returns</b>: An iterator pointing to the element with key equivalent
-   //!   to the key of x.
+   //! <b>Returns</b>: The bool component of the returned pair is true if and only 
+   //!   if the insertion takes place, and the iterator component of the pair
+   //!   points to the element with key equivalent to the key of x.
    //!
    //! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
    //!   is inserted right before p.
    template <class... Args>
-   iterator emplace(Args&&... args)
+   std::pair<iterator,bool> emplace(Args&&... args)
    {  return m_tree.emplace_unique(boost::forward<Args>(args)...); }
 
    //! <b>Effects</b>: Inserts an object of type T constructed with
@@ -536,14 +537,14 @@
 
    #define BOOST_PP_LOCAL_MACRO(n)                                                                 \
    BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >)          \
-   iterator emplace(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _))                           \
-   {  return m_tree.emplace_unique(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)); }      \
+   std::pair<iterator,bool> emplace(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _))            \
+   {  return m_tree.emplace_unique(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)); }       \
                                                                                                    \
    BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >)          \
    iterator emplace_hint(const_iterator hint                                                       \
-                         BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _))             \
+                         BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _))              \
    {  return m_tree.emplace_hint_unique(hint                                                       \
-                               BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _));}  \
+                               BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _));}   \
    //!
    #define BOOST_PP_LOCAL_LIMITS (0, BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS)
    #include BOOST_PP_LOCAL_ITERATE()
@@ -1138,14 +1139,14 @@
 
    #define BOOST_PP_LOCAL_MACRO(n)                                                                 \
    BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >)          \
-   iterator emplace(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _))                           \
-   {  return m_tree.emplace_equal(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)); }       \
+   iterator emplace(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _))                            \
+   {  return m_tree.emplace_equal(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)); }        \
                                                                                                    \
    BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >)          \
    iterator emplace_hint(const_iterator hint                                                       \
-                         BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _))             \
+                         BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _))              \
    {  return m_tree.emplace_hint_equal(hint                                                        \
-                               BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _));}  \
+                               BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _));}   \
    //!
    #define BOOST_PP_LOCAL_LIMITS (0, BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS)
    #include BOOST_PP_LOCAL_ITERATE()
Modified: branches/release/boost/container/set.hpp
==============================================================================
--- branches/release/boost/container/set.hpp	(original)
+++ branches/release/boost/container/set.hpp	2011-12-31 11:19:15 EST (Sat, 31 Dec 2011)
@@ -340,7 +340,8 @@
    { return this->insert(const_cast<const T &>(x)); }
 
    template<class U>
-   std::pair<iterator,bool> insert(const U &u, typename container_detail::enable_if_c<container_detail::is_same<T, U>::value && !::boost::has_move_emulation_enabled<U>::value >::type* =0)
+   std::pair<iterator,bool> insert(const U &u
+      , typename container_detail::enable_if_c<container_detail::is_same<T, U>::value && !::boost::has_move_emulation_enabled<U>::value >::type* =0)
    {  return priv_insert(u); }
    #endif
 
@@ -372,7 +373,8 @@
    { return this->insert(position, const_cast<const T &>(x)); }
 
    template<class U>
-   iterator insert(const_iterator position, const U &u, typename container_detail::enable_if_c<container_detail::is_same<T, U>::value && !::boost::has_move_emulation_enabled<U>::value >::type* =0)
+   iterator insert( const_iterator position, const U &u
+                  , typename container_detail::enable_if_c<container_detail::is_same<T, U>::value && !::boost::has_move_emulation_enabled<U>::value >::type* =0)
    {  return priv_insert(position, u); }
    #endif
 
@@ -397,18 +399,22 @@
 
    #if defined(BOOST_CONTAINER_PERFECT_FORWARDING) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
 
-   //! <b>Effects</b>:  Inserts an object of type T constructed with
+   //! <b>Effects</b>:  Inserts an object x of type T constructed with
    //!   std::forward<Args>(args)... if and only if there is 
    //!   no element in the container with equivalent value.
    //!   and returns the iterator pointing to the
-   //!   newly inserted element. 
+   //!   newly inserted element.
+   //!
+   //! <b>Returns</b>: The bool component of the returned pair is true if and only 
+   //!   if the insertion takes place, and the iterator component of the pair
+   //!   points to the element with key equivalent to the key of x.
    //!
    //! <b>Throws</b>: If memory allocation throws or
    //!   T's in-place constructor throws.
    //!
    //! <b>Complexity</b>: Logarithmic.
    template <class... Args>
-   iterator emplace(Args&&... args)
+   std::pair<iterator,bool> emplace(Args&&... args)
    {  return m_tree.emplace_unique(boost::forward<Args>(args)...); }
 
    //! <b>Effects</b>:  Inserts an object of type T constructed with
@@ -428,14 +434,14 @@
 
    #define BOOST_PP_LOCAL_MACRO(n)                                                                 \
    BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >)          \
-   iterator emplace(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _))                           \
-   {  return m_tree.emplace_unique(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)); }      \
+   std::pair<iterator,bool> emplace(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _))            \
+   {  return m_tree.emplace_unique(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)); }       \
                                                                                                    \
    BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >)          \
    iterator emplace_hint(const_iterator hint                                                       \
-                         BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _))             \
+                         BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _))              \
    {  return m_tree.emplace_hint_unique(hint                                                       \
-                               BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _));}  \
+                               BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _));}   \
    //!
    #define BOOST_PP_LOCAL_LIMITS (0, BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS)
    #include BOOST_PP_LOCAL_ITERATE()
@@ -902,7 +908,8 @@
    { return this->insert(const_cast<const T &>(x)); }
 
    template<class U>
-   iterator insert(const U &u, typename container_detail::enable_if_c<container_detail::is_same<T, U>::value && !::boost::has_move_emulation_enabled<U>::value >::type* =0)
+   iterator insert(const U &u
+      , typename container_detail::enable_if_c<container_detail::is_same<T, U>::value && !::boost::has_move_emulation_enabled<U>::value >::type* =0)
    {  return priv_insert(u); }
    #endif
 
@@ -932,7 +939,8 @@
    { return this->insert(position, const_cast<const T &>(x)); }
 
    template<class U>
-   iterator insert(const_iterator position, const U &u, typename container_detail::enable_if_c<container_detail::is_same<T, U>::value && !::boost::has_move_emulation_enabled<U>::value >::type* =0)
+   iterator insert( const_iterator position, const U &u
+                  , typename container_detail::enable_if_c<container_detail::is_same<T, U>::value && !::boost::has_move_emulation_enabled<U>::value >::type* =0)
    {  return priv_insert(position, u); }
    #endif
 
@@ -983,14 +991,14 @@
 
    #define BOOST_PP_LOCAL_MACRO(n)                                                                 \
    BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >)          \
-   iterator emplace(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _))                           \
-   {  return m_tree.emplace_equal(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)); }       \
+   iterator emplace(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _))                            \
+   {  return m_tree.emplace_equal(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _)); }        \
                                                                                                    \
    BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >)          \
    iterator emplace_hint(const_iterator hint                                                       \
-                         BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _))             \
+                         BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _))              \
    {  return m_tree.emplace_hint_equal(hint                                                        \
-                               BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _));}  \
+                               BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _));}   \
    //!
    #define BOOST_PP_LOCAL_LIMITS (0, BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS)
    #include BOOST_PP_LOCAL_ITERATE()
Modified: branches/release/boost/container/slist.hpp
==============================================================================
--- branches/release/boost/container/slist.hpp	(original)
+++ branches/release/boost/container/slist.hpp	2011-12-31 11:19:15 EST (Sat, 31 Dec 2011)
@@ -638,7 +638,8 @@
    void push_front(T &x) { push_front(const_cast<const T &>(x)); }
 
    template<class U>
-   void push_front(const U &u, typename container_detail::enable_if_c<container_detail::is_same<T, U>::value && !::boost::has_move_emulation_enabled<U>::value >::type* =0)
+   void push_front(const U &u
+      , typename container_detail::enable_if_c<container_detail::is_same<T, U>::value && !::boost::has_move_emulation_enabled<U>::value >::type* =0)
    {  return priv_push_front(u); }
    #endif
 
@@ -700,7 +701,8 @@
    { return this->insert_after(position, const_cast<const T &>(x)); }
 
    template<class U>
-   iterator insert_after(const_iterator position, const U &u, typename container_detail::enable_if_c<container_detail::is_same<T, U>::value && !::boost::has_move_emulation_enabled<U>::value >::type* =0)
+   iterator insert_after( const_iterator position, const U &u
+                        , typename container_detail::enable_if_c<container_detail::is_same<T, U>::value && !::boost::has_move_emulation_enabled<U>::value >::type* =0)
    {  return this->priv_insert_after(position, u); }
    #endif
 
@@ -768,7 +770,8 @@
    { return this->insert(position, const_cast<const T &>(x)); }
 
    template<class U>
-   iterator insert(const_iterator position, const U &u, typename container_detail::enable_if_c<container_detail::is_same<T, U>::value && !::boost::has_move_emulation_enabled<U>::value >::type* =0)
+   iterator insert( const_iterator position, const U &u
+                  , typename container_detail::enable_if_c<container_detail::is_same<T, U>::value && !::boost::has_move_emulation_enabled<U>::value >::type* =0)
    {  return this->priv_insert(position, u); }
    #endif
 
Modified: branches/release/boost/container/stable_vector.hpp
==============================================================================
--- branches/release/boost/container/stable_vector.hpp	(original)
+++ branches/release/boost/container/stable_vector.hpp	2011-12-31 11:19:15 EST (Sat, 31 Dec 2011)
@@ -7,13 +7,14 @@
 // See http://www.boost.org/libs/container for documentation.
 //
 //////////////////////////////////////////////////////////////////////////////
-/* Stable vector.
- *
- * Copyright 2008 Joaquin M Lopez Munoz.
- * Distributed under the Boost Software License, Version 1.0.
- * (See accompanying file LICENSE_1_0.txt or copy at
- * http://www.boost.org/LICENSE_1_0.txt)
- */
+// Stable vector.
+//
+// Copyright 2008 Joaquin M Lopez Munoz.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//////////////////////////////////////////////////////////////////////////////
 
 #ifndef BOOST_CONTAINER_STABLE_VECTOR_HPP
 #define BOOST_CONTAINER_STABLE_VECTOR_HPP
@@ -140,8 +141,8 @@
 
    #define BOOST_PP_LOCAL_MACRO(n)                                                           \
    BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >)    \
-   node_type(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _))                            \
-      : value(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _))                        \
+   node_type(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _))                             \
+      : value(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _))                         \
    {}                                                                                        \
    //!
    #define BOOST_PP_LOCAL_LIMITS (1, BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS)
Modified: branches/release/boost/container/vector.hpp
==============================================================================
--- branches/release/boost/container/vector.hpp	(original)
+++ branches/release/boost/container/vector.hpp	2011-12-31 11:19:15 EST (Sat, 31 Dec 2011)
@@ -1045,32 +1045,32 @@
 
    #define BOOST_PP_LOCAL_MACRO(n)                                                              \
    BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >)       \
-   void emplace_back(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _))                       \
+   void emplace_back(BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_LIST, _))                        \
    {                                                                                            \
-      T* back_pos = container_detail::to_raw_pointer                                              \
+      T* back_pos = container_detail::to_raw_pointer                                            \
          (this->members_.m_start) + this->members_.m_size;                                      \
       if (this->members_.m_size < this->members_.m_capacity){                                   \
          allocator_traits_type::construct (this->alloc()                                        \
-            , back_pos BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _) );       \
+            , back_pos BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _) );        \
          ++this->members_.m_size;                                                               \
       }                                                                                         \
       else{                                                                                     \
-         container_detail::BOOST_PP_CAT(BOOST_PP_CAT(advanced_insert_aux_emplace, n), arg)     \
+         container_detail::BOOST_PP_CAT(BOOST_PP_CAT(advanced_insert_aux_emplace, n), arg)      \
             <A, T* BOOST_PP_ENUM_TRAILING_PARAMS(n, P)> proxy                                   \
-            (this->alloc() BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _));    \
+            (this->alloc() BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _));     \
          priv_range_insert(back_pos, 1, proxy);                                                 \
       }                                                                                         \
    }                                                                                            \
                                                                                                 \
    BOOST_PP_EXPR_IF(n, template<) BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IF(n, >)       \
    iterator emplace(const_iterator pos                                                          \
-                    BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _))               \
+                    BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _))                \
    {                                                                                            \
       size_type pos_n = pos - cbegin();                                                         \
-         container_detail::BOOST_PP_CAT(BOOST_PP_CAT(advanced_insert_aux_emplace, n), arg)     \
+         container_detail::BOOST_PP_CAT(BOOST_PP_CAT(advanced_insert_aux_emplace, n), arg)      \
             <A, T* BOOST_PP_ENUM_TRAILING_PARAMS(n, P)> proxy                                   \
-            (this->alloc() BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _));    \
-      priv_range_insert(container_detail::to_raw_pointer(pos.get_ptr()), 1, proxy);               \
+            (this->alloc() BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _));     \
+      priv_range_insert(container_detail::to_raw_pointer(pos.get_ptr()), 1, proxy);             \
       return iterator(this->members_.m_start + pos_n);                                          \
    }                                                                                            \
    //!
Modified: branches/release/boost/interprocess/allocators/adaptive_pool.hpp
==============================================================================
--- branches/release/boost/interprocess/allocators/adaptive_pool.hpp	(original)
+++ branches/release/boost/interprocess/allocators/adaptive_pool.hpp	2011-12-31 11:19:15 EST (Sat, 31 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: branches/release/boost/interprocess/allocators/allocator.hpp
==============================================================================
--- branches/release/boost/interprocess/allocators/allocator.hpp	(original)
+++ branches/release/boost/interprocess/allocators/allocator.hpp	2011-12-31 11:19:15 EST (Sat, 31 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: branches/release/boost/interprocess/allocators/detail/adaptive_node_pool.hpp
==============================================================================
--- branches/release/boost/interprocess/allocators/detail/adaptive_node_pool.hpp	(original)
+++ branches/release/boost/interprocess/allocators/detail/adaptive_node_pool.hpp	2011-12-31 11:19:15 EST (Sat, 31 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: branches/release/boost/interprocess/allocators/detail/allocator_common.hpp
==============================================================================
--- branches/release/boost/interprocess/allocators/detail/allocator_common.hpp	(original)
+++ branches/release/boost/interprocess/allocators/detail/allocator_common.hpp	2011-12-31 11:19:15 EST (Sat, 31 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: branches/release/boost/interprocess/allocators/detail/node_pool.hpp
==============================================================================
--- branches/release/boost/interprocess/allocators/detail/node_pool.hpp	(original)
+++ branches/release/boost/interprocess/allocators/detail/node_pool.hpp	2011-12-31 11:19:15 EST (Sat, 31 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: branches/release/boost/interprocess/allocators/node_allocator.hpp
==============================================================================
--- branches/release/boost/interprocess/allocators/node_allocator.hpp	(original)
+++ branches/release/boost/interprocess/allocators/node_allocator.hpp	2011-12-31 11:19:15 EST (Sat, 31 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: branches/release/boost/interprocess/allocators/private_adaptive_pool.hpp
==============================================================================
--- branches/release/boost/interprocess/allocators/private_adaptive_pool.hpp	(original)
+++ branches/release/boost/interprocess/allocators/private_adaptive_pool.hpp	2011-12-31 11:19:15 EST (Sat, 31 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: branches/release/boost/interprocess/allocators/private_node_allocator.hpp
==============================================================================
--- branches/release/boost/interprocess/allocators/private_node_allocator.hpp	(original)
+++ branches/release/boost/interprocess/allocators/private_node_allocator.hpp	2011-12-31 11:19:15 EST (Sat, 31 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: branches/release/boost/interprocess/detail/segment_manager_helper.hpp
==============================================================================
--- branches/release/boost/interprocess/detail/segment_manager_helper.hpp	(original)
+++ branches/release/boost/interprocess/detail/segment_manager_helper.hpp	2011-12-31 11:19:15 EST (Sat, 31 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: branches/release/boost/interprocess/ipc/message_queue.hpp
==============================================================================
--- branches/release/boost/interprocess/ipc/message_queue.hpp	(original)
+++ branches/release/boost/interprocess/ipc/message_queue.hpp	2011-12-31 11:19:15 EST (Sat, 31 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: branches/release/boost/interprocess/mapped_region.hpp
==============================================================================
--- branches/release/boost/interprocess/mapped_region.hpp	(original)
+++ branches/release/boost/interprocess/mapped_region.hpp	2011-12-31 11:19:15 EST (Sat, 31 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: branches/release/boost/interprocess/mem_algo/detail/multi_simple_seq_fit_impl.hpp
==============================================================================
--- branches/release/boost/interprocess/mem_algo/detail/multi_simple_seq_fit_impl.hpp	(original)
+++ branches/release/boost/interprocess/mem_algo/detail/multi_simple_seq_fit_impl.hpp	2011-12-31 11:19:15 EST (Sat, 31 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: branches/release/boost/interprocess/mem_algo/detail/simple_seq_fit_impl.hpp
==============================================================================
--- branches/release/boost/interprocess/mem_algo/detail/simple_seq_fit_impl.hpp	(original)
+++ branches/release/boost/interprocess/mem_algo/detail/simple_seq_fit_impl.hpp	2011-12-31 11:19:15 EST (Sat, 31 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: branches/release/boost/interprocess/mem_algo/rbtree_best_fit.hpp
==============================================================================
--- branches/release/boost/interprocess/mem_algo/rbtree_best_fit.hpp	(original)
+++ branches/release/boost/interprocess/mem_algo/rbtree_best_fit.hpp	2011-12-31 11:19:15 EST (Sat, 31 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: branches/release/boost/interprocess/offset_ptr.hpp
==============================================================================
--- branches/release/boost/interprocess/offset_ptr.hpp	(original)
+++ branches/release/boost/interprocess/offset_ptr.hpp	2011-12-31 11:19:15 EST (Sat, 31 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: branches/release/boost/interprocess/smart_ptr/deleter.hpp
==============================================================================
--- branches/release/boost/interprocess/smart_ptr/deleter.hpp	(original)
+++ branches/release/boost/interprocess/smart_ptr/deleter.hpp	2011-12-31 11:19:15 EST (Sat, 31 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: branches/release/boost/interprocess/smart_ptr/detail/shared_count.hpp
==============================================================================
--- branches/release/boost/interprocess/smart_ptr/detail/shared_count.hpp	(original)
+++ branches/release/boost/interprocess/smart_ptr/detail/shared_count.hpp	2011-12-31 11:19:15 EST (Sat, 31 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: branches/release/boost/interprocess/smart_ptr/detail/sp_counted_impl.hpp
==============================================================================
--- branches/release/boost/interprocess/smart_ptr/detail/sp_counted_impl.hpp	(original)
+++ branches/release/boost/interprocess/smart_ptr/detail/sp_counted_impl.hpp	2011-12-31 11:19:15 EST (Sat, 31 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: branches/release/boost/interprocess/smart_ptr/intrusive_ptr.hpp
==============================================================================
--- branches/release/boost/interprocess/smart_ptr/intrusive_ptr.hpp	(original)
+++ branches/release/boost/interprocess/smart_ptr/intrusive_ptr.hpp	2011-12-31 11:19:15 EST (Sat, 31 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: branches/release/boost/interprocess/smart_ptr/scoped_ptr.hpp
==============================================================================
--- branches/release/boost/interprocess/smart_ptr/scoped_ptr.hpp	(original)
+++ branches/release/boost/interprocess/smart_ptr/scoped_ptr.hpp	2011-12-31 11:19:15 EST (Sat, 31 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: branches/release/boost/interprocess/smart_ptr/shared_ptr.hpp
==============================================================================
--- branches/release/boost/interprocess/smart_ptr/shared_ptr.hpp	(original)
+++ branches/release/boost/interprocess/smart_ptr/shared_ptr.hpp	2011-12-31 11:19:15 EST (Sat, 31 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: branches/release/boost/interprocess/smart_ptr/weak_ptr.hpp
==============================================================================
--- branches/release/boost/interprocess/smart_ptr/weak_ptr.hpp	(original)
+++ branches/release/boost/interprocess/smart_ptr/weak_ptr.hpp	2011-12-31 11:19:15 EST (Sat, 31 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
Modified: branches/release/boost/intrusive/circular_slist_algorithms.hpp
==============================================================================
--- branches/release/boost/intrusive/circular_slist_algorithms.hpp	(original)
+++ branches/release/boost/intrusive/circular_slist_algorithms.hpp	2011-12-31 11:19:15 EST (Sat, 31 Dec 2011)
@@ -74,7 +74,7 @@
    //! 
    //! <b>Effects</b>: Returns true is "this_node" is the only node of a circular list:
    //!  or it's a not inserted node:
-   //!  <tt>return false == NodeTraits::get_next(this_node) || NodeTraits::get_next(this_node) == this_node</tt>
+   //!  <tt>return node_ptr() == NodeTraits::get_next(this_node) || NodeTraits::get_next(this_node) == this_node</tt>
    //! 
    //! <b>Complexity</b>: Constant
    //! 
Modified: branches/release/boost/intrusive/detail/has_member_function_callable_with.hpp
==============================================================================
--- branches/release/boost/intrusive/detail/has_member_function_callable_with.hpp	(original)
+++ branches/release/boost/intrusive/detail/has_member_function_callable_with.hpp	2011-12-31 11:19:15 EST (Sat, 31 Dec 2011)
@@ -21,6 +21,12 @@
       #include <boost/static_assert.hpp>
       #include <boost/move/move.hpp>
 
+      //Mark that we don't support 0 arg calls due to compiler ICE in GCC 3.4/4.0/4.1 and 
+      //wrong SFINAE for GCC 4.2/4.3
+      #if defined(__GNUC__) && !defined(__clang__) && ((__GNUC__*100 + __GNUC_MINOR__*10) >= 340) && ((__GNUC__*100 + __GNUC_MINOR__*10) <= 430)
+      #define BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED
+      #endif
+
       namespace boost_intrusive_has_member_function_callable_with {
 
       struct dont_care
@@ -107,6 +113,18 @@
 
          #if !defined(_MSC_VER) || (_MSC_VER != 1600)
 
+            #if defined(BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED)
+
+            template<typename Fun>
+            struct BOOST_PP_CAT(BOOST_PP_CAT(has_member_function_callable_with_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME),_impl)
+               <Fun, true BOOST_PP_ENUM_TRAILING(BOOST_PP_SUB(BOOST_PP_ITERATION_FINISH(), BOOST_PP_ITERATION()), BOOST_INTRUSIVE_PP_IDENTITY, void)>
+            {
+               //Mark that we don't support 0 arg calls due to compiler ICE in GCC 3.4/4.0/4.1 and 
+               //wrong SFINAE for GCC 4.2/4.3
+               static const bool value = true;
+            };
+
+            #else
             //Special case for 0 args
             template< class F
                   , std::size_t N = 
@@ -141,6 +159,7 @@
                static const bool value = sizeof(Test< Fun >(0))
                                     == sizeof(boost_intrusive_has_member_function_callable_with::yes_type);
             };
+            #endif
 
          #else //#if !defined(_MSC_VER) || (_MSC_VER != 1600)
             template<typename Fun>
Modified: branches/release/boost/intrusive/detail/memory_util.hpp
==============================================================================
--- branches/release/boost/intrusive/detail/memory_util.hpp	(original)
+++ branches/release/boost/intrusive/detail/memory_util.hpp	2011-12-31 11:19:15 EST (Sat, 31 Dec 2011)
@@ -69,13 +69,42 @@
       static const bool value = (1 == sizeof(test<T>(0, 0)));              \
                                                                            \
       typedef typename                                                     \
-         ::boost::intrusive::detail::if_c<value, T, DefaultWrap>::type::TNAME type;      \
-    }                                                                      \
+         ::boost::intrusive::detail::if_c                                  \
+            <value, T, DefaultWrap>::type::TNAME type;                     \
+   };                                                                      \
+                                                                           \
+   template <typename T, typename DefaultType>                             \
+   struct boost_intrusive_eval_default_type_ ## TNAME                      \
+   {                                                                       \
+      template <typename X>                                                \
+      static char test(int, typename X::TNAME*);                           \
+                                                                           \
+      template <typename X>                                                \
+      static int test(boost::intrusive::detail::                           \
+         LowPriorityConversion<int>, void*);                               \
+                                                                           \
+      struct DefaultWrap                                                   \
+      { typedef typename DefaultType::type TNAME; };                       \
+                                                                           \
+      static const bool value = (1 == sizeof(test<T>(0, 0)));              \
+                                                                           \
+      typedef typename                                                     \
+         ::boost::intrusive::detail::eval_if_c                             \
+            < value                                                        \
+            , ::boost::intrusive::detail::identity<T>                      \
+            , ::boost::intrusive::detail::identity<DefaultWrap>            \
+            >::type::TNAME type;                                           \
+   };                                                                      \
+//
+
+#define BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(INSTANTIATION_NS_PREFIX, T, TNAME, TIMPL)   \
+      typename INSTANTIATION_NS_PREFIX                                                       \
+         boost_intrusive_default_type_ ## TNAME< T, TIMPL >::type                            \
 //
 
-#define BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(INSTANTIATION_NS_PREFIX, T, TNAME, TIMPL) \
-      typename INSTANTIATION_NS_PREFIX                            \
-         boost_intrusive_default_type_ ## TNAME<T, TIMPL>::type   \
+#define BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(INSTANTIATION_NS_PREFIX, T, TNAME, TIMPL) \
+      typename INSTANTIATION_NS_PREFIX                                                          \
+         boost_intrusive_eval_default_type_ ## TNAME< T, TIMPL >::type                          \
 //
 
 }}}   //namespace boost::intrusive::detail
Modified: branches/release/boost/intrusive/detail/utilities.hpp
==============================================================================
--- branches/release/boost/intrusive/detail/utilities.hpp	(original)
+++ branches/release/boost/intrusive/detail/utilities.hpp	2011-12-31 11:19:15 EST (Sat, 31 Dec 2011)
@@ -208,14 +208,14 @@
    };
 
    template<class T>
-   typename enable_if_c<is_node_ptr<T>::value, const value_type &>::type
-      key_forward(const T &node) const
+   const value_type & key_forward
+      (const T &node, typename enable_if_c<is_node_ptr<T>::value>::type * = 0) const
    {  return *cont_->get_real_value_traits().to_value_ptr(node);  }
 
    template<class T>
-   typename enable_if_c<!is_node_ptr<T>::value, const T &>::type
-      key_forward(const T &key) const
-   {  return key;}
+   const T & key_forward(const T &key, typename enable_if_c<!is_node_ptr<T>::value>::type* = 0) const
+   {  return key;  }
+
 
    template<class KeyType, class KeyType2>
    bool operator()(const KeyType &key1, const KeyType2 &key2) const
@@ -596,20 +596,20 @@
    }
 };
 
-template<class Container, class Disposer>
+template<class Container, class Disposer, class SizeType>
 class exception_array_disposer
 {
    Container *cont_;
    Disposer  &disp_;
-   typename Container::size_type  &constructed_;
+   SizeType  &constructed_;
 
    exception_array_disposer(const exception_array_disposer&);
    exception_array_disposer &operator=(const exception_array_disposer&);
 
    public:
-   typedef typename Container::size_type size_type;
+
    exception_array_disposer
-      (Container &cont, Disposer &disp, size_type &constructed)
+      (Container &cont, Disposer &disp, SizeType &constructed)
       :  cont_(&cont), disp_(disp), constructed_(constructed)
    {}
 
@@ -618,7 +618,7 @@
 
    ~exception_array_disposer()
    {
-      size_type n = constructed_;
+      SizeType n = constructed_;
       if(cont_){
          while(n--){
             cont_[n].clear_and_dispose(disp_);
Modified: branches/release/boost/intrusive/hashtable.hpp
==============================================================================
--- branches/release/boost/intrusive/hashtable.hpp	(original)
+++ branches/release/boost/intrusive/hashtable.hpp	2011-12-31 11:19:15 EST (Sat, 31 Dec 2011)
@@ -30,6 +30,7 @@
 #include <boost/intrusive/link_mode.hpp>
 #include <boost/intrusive/detail/ebo_functor_holder.hpp>
 #include <boost/intrusive/detail/clear_on_destructor_base.hpp>
+#include <boost/intrusive/detail/utilities.hpp>
 //Implementation utilities
 #include <boost/intrusive/trivial_value_traits.hpp>
 #include <boost/intrusive/unordered_set_hook.hpp>
@@ -1131,7 +1132,7 @@
             typedef node_cast_adaptor<detail::node_cloner<Cloner, hashtable_impl> > NodeCloner;
             NodeDisposer node_disp(disposer, this);
    
-            detail::exception_array_disposer<bucket_type, NodeDisposer>
+            detail::exception_array_disposer<bucket_type, NodeDisposer, size_type>
                rollback(dst_buckets[0], node_disp, constructed);
             for( constructed = 0
                ; constructed < dst_bucket_count
@@ -2080,10 +2081,12 @@
       //is harmless, because all elements have been already unlinked and destroyed
       typedef detail::init_disposer<node_algorithms> NodeDisposer;
       NodeDisposer node_disp;
-      detail::exception_array_disposer<bucket_type, NodeDisposer>
-         rollback1(new_buckets[0], node_disp, new_buckets_len);
-      detail::exception_array_disposer<bucket_type, NodeDisposer>
-         rollback2(old_buckets[0], node_disp, old_buckets_len);
+      bucket_type & newbuck = new_buckets[0];
+      bucket_type & oldbuck = old_buckets[0];
+      detail::exception_array_disposer<bucket_type, NodeDisposer, size_type>
+         rollback1(newbuck, node_disp, new_buckets_len);
+      detail::exception_array_disposer<bucket_type, NodeDisposer, size_type>
+         rollback2(oldbuck, node_disp, old_buckets_len);
 
       //Put size in a safe value for rollback exception
       size_type size_backup = this->priv_size_traits().get_size();
Modified: branches/release/boost/intrusive/linear_slist_algorithms.hpp
==============================================================================
--- branches/release/boost/intrusive/linear_slist_algorithms.hpp	(original)
+++ branches/release/boost/intrusive/linear_slist_algorithms.hpp	2011-12-31 11:19:15 EST (Sat, 31 Dec 2011)
@@ -73,7 +73,7 @@
    //! 
    //! <b>Effects</b>: Returns true is "this_node" is the only node of a circular list:
    //!  or it's a not inserted node:
-   //!  <tt>return false == NodeTraits::get_next(this_node) || NodeTraits::get_next(this_node) == this_node</tt>
+   //!  <tt>return node_ptr() == NodeTraits::get_next(this_node) || NodeTraits::get_next(this_node) == this_node</tt>
    //! 
    //! <b>Complexity</b>: Constant 
    //! 
Modified: branches/release/boost/intrusive/pointer_traits.hpp
==============================================================================
--- branches/release/boost/intrusive/pointer_traits.hpp	(original)
+++ branches/release/boost/intrusive/pointer_traits.hpp	2011-12-31 11:19:15 EST (Sat, 31 Dec 2011)
@@ -67,9 +67,9 @@
    #else
       typedef Ptr                                                             pointer;
       //
-      typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT
+      typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT
          ( boost::intrusive::detail::, Ptr, element_type
-         , typename boost::intrusive::detail::first_param<Ptr>::type)         element_type;
+         , boost::intrusive::detail::first_param<Ptr>)                        element_type;
       //
       typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT
          (boost::intrusive::detail::, Ptr, difference_type, std::ptrdiff_t)   difference_type;
Modified: branches/release/libs/container/doc/container.qbk
==============================================================================
--- branches/release/libs/container/doc/container.qbk	(original)
+++ branches/release/libs/container/doc/container.qbk	2011-12-31 11:19:15 EST (Sat, 31 Dec 2011)
@@ -590,7 +590,9 @@
 *  Fixed bugs
   [@https://svn.boost.org/trac/boost/ticket/6205 #6205],
   [@https://svn.boost.org/trac/boost/ticket/6287 #6287],
-  [@https://svn.boost.org/trac/boost/ticket/4383 #4383].
+  [@https://svn.boost.org/trac/boost/ticket/4383 #4383],
+  [@https://svn.boost.org/trac/boost/ticket/6336 #6336],
+  [@https://svn.boost.org/trac/boost/ticket/6335 #6335].
 
 *  Added `allocator_traits` support for both C++11 and C++03
    compilers through an internal `allocator_traits` clone.
Modified: branches/release/libs/container/test/allocator_traits_test.cpp
==============================================================================
--- branches/release/libs/container/test/allocator_traits_test.cpp	(original)
+++ branches/release/libs/container/test/allocator_traits_test.cpp	2011-12-31 11:19:15 EST (Sat, 31 Dec 2011)
@@ -15,6 +15,7 @@
 #include <boost/type_traits/integral_constant.hpp>
 #include <boost/container/detail/function_detector.hpp>
 #include <boost/move/move.hpp>
+#include <memory>
 
 template<class T>
 class SimpleAllocator
@@ -63,7 +64,7 @@
    T *ptr_;
 };
 
-template<class T, class Arg>
+template<class T>
 class ComplexAllocator
 {
    bool allocate_called_;
@@ -76,17 +77,19 @@
 
    public:
    typedef T value_type;
-   typedef SimpleSmartPtr<T>           pointer;
-   typedef SimpleSmartPtr<const T>     const_pointer;
-   typedef T &                         reference;
-   typedef const T &                   const_reference;
-   typedef SimpleSmartPtr<void>        void_pointer;
-   typedef SimpleSmartPtr<const void>  const_void_pointer;
-   typedef signed short                difference_type;
-   typedef unsigned short              size_type;
-   typedef boost::true_type            propagate_on_container_copy_assignment;
-   typedef boost::true_type            propagate_on_container_move_assignment;
-   typedef boost::true_type            propagate_on_container_swap;
+   typedef SimpleSmartPtr<T>                    pointer;
+   typedef SimpleSmartPtr<const T>              const_pointer;
+   typedef typename boost::container::
+      container_detail::unvoid<T>::type &       reference;
+   typedef const typename boost::container::
+      container_detail::unvoid<T>::type &       const_reference;
+   typedef SimpleSmartPtr<void>                 void_pointer;
+   typedef SimpleSmartPtr<const void>           const_void_pointer;
+   typedef signed short                         difference_type;
+   typedef unsigned short                       size_type;
+   typedef boost::true_type                     propagate_on_container_copy_assignment;
+   typedef boost::true_type                     propagate_on_container_move_assignment;
+   typedef boost::true_type                     propagate_on_container_swap;
 
    ComplexAllocator()
       : allocate_called_(false)
@@ -120,10 +123,10 @@
 
    #define BOOST_PP_LOCAL_MACRO(n)                                                              \
    template<class U  BOOST_PP_ENUM_TRAILING_PARAMS(n, class P) >                                \
-   void construct(U *p BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _))            \
+   void construct(U *p BOOST_PP_ENUM_TRAILING(n, BOOST_CONTAINER_PP_PARAM_LIST, _))             \
    {                                                                                            \
       construct_called_ = true;                                                                 \
-      ::new (p) U (BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _));                     \
+      ::new (p) U (BOOST_PP_ENUM(n, BOOST_CONTAINER_PP_PARAM_FORWARD, _));                      \
    }                                                                                            \
    //
    #define BOOST_PP_LOCAL_LIMITS (0, BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS)
@@ -187,8 +190,17 @@
    {  return moved_;  }
 };
 
+void test_void_allocator()
+{
+   boost::container::allocator_traits<std::allocator<void>   > stdtraits; (void)stdtraits;
+   boost::container::allocator_traits<SimpleAllocator<void>  > simtraits; (void)simtraits;
+   boost::container::allocator_traits<ComplexAllocator<void> > comtraits; (void)comtraits;
+}
+
 int main()
 {
+   test_void_allocator();
+
    //SimpleAllocator
    BOOST_STATIC_ASSERT(( boost::is_same<boost::container::allocator_traits
                        < SimpleAllocator<int> >::value_type, int>::value ));
@@ -219,33 +231,33 @@
 
    //ComplexAllocator
    BOOST_STATIC_ASSERT(( boost::is_same<boost::container::allocator_traits
-                       < ComplexAllocator<int, void> >::value_type, int>::value ));
+                       < ComplexAllocator<int> >::value_type, int>::value ));
    BOOST_STATIC_ASSERT(( boost::is_same<boost::container::allocator_traits
-                       < ComplexAllocator<int, void> >::pointer,  SimpleSmartPtr<int> >::value ));
+                       < ComplexAllocator<int> >::pointer,  SimpleSmartPtr<int> >::value ));
    BOOST_STATIC_ASSERT(( boost::is_same<boost::container::allocator_traits
-                       < ComplexAllocator<int, void> >::const_pointer, SimpleSmartPtr<const int> >::value ));
+                       < ComplexAllocator<int> >::const_pointer, SimpleSmartPtr<const int> >::value ));
    BOOST_STATIC_ASSERT(( boost::is_same<boost::container::allocator_traits
-                       < ComplexAllocator<int, void> >::void_pointer, SimpleSmartPtr<void> >::value ));
+                       < ComplexAllocator<int> >::void_pointer, SimpleSmartPtr<void> >::value ));
    BOOST_STATIC_ASSERT(( boost::is_same<boost::container::allocator_traits
-                       < ComplexAllocator<int, void> >::const_void_pointer, SimpleSmartPtr<const void> >::value ));
+                       < ComplexAllocator<int> >::const_void_pointer, SimpleSmartPtr<const void> >::value ));
    BOOST_STATIC_ASSERT(( boost::is_same<boost::container::allocator_traits
-                       < ComplexAllocator<int, void> >::difference_type, signed short>::value ));
+                       < ComplexAllocator<int> >::difference_type, signed short>::value ));
    BOOST_STATIC_ASSERT(( boost::is_same<boost::container::allocator_traits
-                       < ComplexAllocator<int, void> >::size_type, unsigned short>::value ));
+                       < ComplexAllocator<int> >::size_type, unsigned short>::value ));
    BOOST_STATIC_ASSERT(( boost::container::allocator_traits
-                       < ComplexAllocator<int, void> >::propagate_on_container_copy_assignment::value == true ));
+                       < ComplexAllocator<int> >::propagate_on_container_copy_assignment::value == true ));
    BOOST_STATIC_ASSERT(( boost::container::allocator_traits
-                       < ComplexAllocator<int, void> >::propagate_on_container_move_assignment::value == true ));
+                       < ComplexAllocator<int> >::propagate_on_container_move_assignment::value == true ));
    BOOST_STATIC_ASSERT(( boost::container::allocator_traits
-                       < ComplexAllocator<int, void> >::propagate_on_container_swap::value == true ));
+                       < ComplexAllocator<int> >::propagate_on_container_swap::value == true ));
    BOOST_STATIC_ASSERT(( boost::is_same<boost::container::allocator_traits
-                       < ComplexAllocator<int, void> >::rebind_traits<double>::allocator_type
-                       , ComplexAllocator<double, void> >::value ));
+                       < ComplexAllocator<int> >::rebind_traits<double>::allocator_type
+                       , ComplexAllocator<double> >::value ));
    BOOST_STATIC_ASSERT(( boost::is_same<boost::container::allocator_traits
-                       < ComplexAllocator<int, void> >::rebind_alloc<double>::value_type
+                       < ComplexAllocator<int> >::rebind_alloc<double>::value_type
                        , double >::value ));
 
-   typedef ComplexAllocator<int, void> CAlloc;
+   typedef ComplexAllocator<int> CAlloc;
    typedef SimpleAllocator<int> SAlloc;
    typedef boost::container::allocator_traits<CAlloc> CAllocTraits;
    typedef boost::container::allocator_traits<SAlloc> SAllocTraits;
Modified: branches/release/libs/interprocess/test/allocator_v1.hpp
==============================================================================
--- branches/release/libs/interprocess/test/allocator_v1.hpp	(original)
+++ branches/release/libs/interprocess/test/allocator_v1.hpp	2011-12-31 11:19:15 EST (Sat, 31 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>
@@ -50,12 +50,13 @@
    typedef SegmentManager                          segment_manager;
    typedef typename segment_manager::void_pointer  aux_pointer_t;
 
-   typedef typename 
-      boost::pointer_to_other
-         <aux_pointer_t, const void>::type   cvoid_ptr;
-
-   typedef typename boost::pointer_to_other
-      <cvoid_ptr, segment_manager>::type     alloc_ptr_t;
+   typedef typename boost::intrusive::
+      pointer_traits<aux_pointer_t>::template
+         rebind_pointer<const void>::type          cvoid_ptr;
+
+   typedef typename boost::intrusive::
+      pointer_traits<cvoid_ptr>::template
+         rebind_pointer<segment_manager>::type     alloc_ptr_t;
 
    template<class T2, class SegmentManager2>
    allocator_v1& operator=(const allocator_v1<T2, SegmentManager2>&);
@@ -66,10 +67,15 @@
 
  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<cvoid_ptr>::template
+         rebind_pointer<const T>::type          const_pointer;
+
    typedef typename ipcdetail::add_reference
                      <value_type>::type         reference;
    typedef typename ipcdetail::add_reference
Modified: branches/release/libs/interprocess/test/heap_allocator_v1.hpp
==============================================================================
--- branches/release/libs/interprocess/test/heap_allocator_v1.hpp	(original)
+++ branches/release/libs/interprocess/test/heap_allocator_v1.hpp	2011-12-31 11:19:15 EST (Sat, 31 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>
@@ -50,12 +50,13 @@
    typedef SegmentManager                          segment_manager;
    typedef typename segment_manager::void_pointer  aux_pointer_t;
 
-   typedef typename 
-      boost::pointer_to_other
-         <aux_pointer_t, const void>::type   cvoid_ptr;
-
-   typedef typename boost::pointer_to_other
-      <cvoid_ptr, segment_manager>::type     alloc_ptr_t;
+   typedef typename boost::intrusive::
+      pointer_traits<aux_pointer_t>::template
+         rebind_pointer<const void>::type          cvoid_ptr;
+
+   typedef typename boost::intrusive::
+      pointer_traits<cvoid_ptr>::template
+         rebind_pointer<segment_manager>::type     alloc_ptr_t;
 
    template<class T2, class SegmentManager2>
    heap_allocator_v1& operator=(const heap_allocator_v1<T2, SegmentManager2>&);
@@ -66,10 +67,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<cvoid_ptr>::template
+         rebind_pointer<const T>::type          const_pointer;
    typedef typename ipcdetail::add_reference
                      <value_type>::type         reference;
    typedef typename ipcdetail::add_reference
Modified: branches/release/libs/intrusive/test/has_member_function_callable_with.cpp
==============================================================================
--- branches/release/libs/intrusive/test/has_member_function_callable_with.cpp	(original)
+++ branches/release/libs/intrusive/test/has_member_function_callable_with.cpp	2011-12-31 11:19:15 EST (Sat, 31 Dec 2011)
@@ -10,6 +10,8 @@
 
 #include <boost/intrusive/detail/config_begin.hpp>
 #include <boost/intrusive/detail/workaround.hpp>
+//Just for BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED
+#include <boost/intrusive/detail/has_member_function_callable_with.hpp>
 #include <cstddef>
 #include <boost/move/move.hpp>
 
@@ -94,6 +96,8 @@
 
       #if !defined(_MSC_VER) || (_MSC_VER != 1600)
 
+         #if !defined(BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED)
+
          template<class F, std::size_t N = sizeof(boost::move_detail::declval<F>().func(), 0)>
          struct zeroarg_checker_func
          {
@@ -120,10 +124,22 @@
             template <class U> 
             static has_member_function_callable_with::no_type Test(...);
             
-            static const bool value = sizeof(Test< Fun >(0))
-                                 == sizeof(has_member_function_callable_with::yes_type);
+            static const bool value
+               = sizeof(Test< Fun >(0)) == sizeof(has_member_function_callable_with::yes_type);
          };
 
+         #else
+
+         template<typename Fun>
+         struct has_member_function_callable_with_func_impl
+            <Fun, true , void , void , void>
+         {
+            //GCC [3.4-4.3) gives ICE when instantiating the 0 arg version so it is not supported.
+            static const bool value = true;
+         };
+
+         #endif
+
       #else
 
          template<typename Fun>
@@ -380,6 +396,7 @@
 {
    using namespace boost::intrusive::intrusive_detail;
 
+   #if !defined(BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED)
    {
    int check1[ has_member_function_callable_with_func<functor>::value  ? 1 : -1];
    int check2[!has_member_function_callable_with_func<functor2>::value ? 1 : -1];
@@ -390,6 +407,7 @@
    (void)check3;
    (void)check4;
    }
+   #endif
 
    {
    int check1[ has_member_function_callable_with_func<functor,  int>::value   ? 1 : -1];