Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76077 - in trunk/boost/heap: . detail
From: tim_at_[hidden]
Date: 2011-12-20 05:27:06


Author: timblechmann
Date: 2011-12-20 05:27:04 EST (Tue, 20 Dec 2011)
New Revision: 76077
URL: http://svn.boost.org/trac/boost/changeset/76077

Log:
heap: pathscale fixes

Text files modified:
   trunk/boost/heap/d_ary_heap.hpp | 3 ++-
   trunk/boost/heap/detail/heap_node.hpp | 2 +-
   trunk/boost/heap/detail/mutable_heap.hpp | 7 +++++--
   trunk/boost/heap/detail/ordered_adaptor_iterator.hpp | 5 ++++-
   trunk/boost/heap/detail/tree_iterator.hpp | 6 ++++--
   trunk/boost/heap/priority_queue.hpp | 3 ++-
   6 files changed, 18 insertions(+), 8 deletions(-)

Modified: trunk/boost/heap/d_ary_heap.hpp
==============================================================================
--- trunk/boost/heap/d_ary_heap.hpp (original)
+++ trunk/boost/heap/d_ary_heap.hpp 2011-12-20 05:27:04 EST (Tue, 20 Dec 2011)
@@ -65,7 +65,8 @@
     typedef typename heap_base_maker::type super_t;
     typedef typename super_t::internal_type internal_type;
 
- typedef std::vector<internal_type, typename heap_base_maker::allocator_argument> container_type;
+ typedef typename heap_base_maker::allocator_argument::template rebind<internal_type>::other internal_type_allocator;
+ typedef std::vector<internal_type, internal_type_allocator> container_type;
     typedef typename container_type::const_iterator container_iterator;
 
     typedef typename IndexUpdater::template rebind<internal_type>::other index_updater;

Modified: trunk/boost/heap/detail/heap_node.hpp
==============================================================================
--- trunk/boost/heap/detail/heap_node.hpp (original)
+++ trunk/boost/heap/detail/heap_node.hpp 2011-12-20 05:27:04 EST (Tue, 20 Dec 2011)
@@ -178,7 +178,7 @@
     {}
 #endif
 
-protected:
+/* protected: */
     heap_node(heap_node const & rhs):
         value(rhs.value)
     {

Modified: trunk/boost/heap/detail/mutable_heap.hpp
==============================================================================
--- trunk/boost/heap/detail/mutable_heap.hpp (original)
+++ trunk/boost/heap/detail/mutable_heap.hpp 2011-12-20 05:27:04 EST (Tue, 20 Dec 2011)
@@ -48,7 +48,7 @@
 private:
     typedef std::pair<value_type, size_type> node_type;
 
- typedef std::list<node_type, allocator_type> object_list;
+ typedef std::list<node_type, typename allocator_type::template rebind<node_type>::other> object_list;
 
     typedef typename object_list::iterator list_iterator;
     typedef typename object_list::const_iterator const_list_iterator;
@@ -274,7 +274,10 @@
             }
         }
 
- std::priority_queue<iterator, std::vector<iterator, allocator_type>, indirect_cmp> unvisited_nodes;
+ std::priority_queue<iterator,
+ std::vector<iterator, typename allocator_type::template rebind<iterator>::other >,
+ indirect_cmp
+ > unvisited_nodes;
         const priority_queue_mutable_wrapper * q_;
     };
 

Modified: trunk/boost/heap/detail/ordered_adaptor_iterator.hpp
==============================================================================
--- trunk/boost/heap/detail/ordered_adaptor_iterator.hpp (original)
+++ trunk/boost/heap/detail/ordered_adaptor_iterator.hpp 2011-12-20 05:27:04 EST (Tue, 20 Dec 2011)
@@ -132,7 +132,10 @@
             unvisited_nodes.push(i);
     }
 
- std::priority_queue<size_t, std::vector<size_t, Alloc>, compare_by_heap_value> unvisited_nodes;
+ std::priority_queue<size_t,
+ std::vector<size_t, typename Alloc::template rebind<size_t>::other >,
+ compare_by_heap_value
+ > unvisited_nodes;
 };
 
 

Modified: trunk/boost/heap/detail/tree_iterator.hpp
==============================================================================
--- trunk/boost/heap/detail/tree_iterator.hpp (original)
+++ trunk/boost/heap/detail/tree_iterator.hpp 2011-12-20 05:27:04 EST (Tue, 20 Dec 2011)
@@ -96,7 +96,7 @@
         return data_.empty();
     }
 
- std::vector<HandleType, Alloc> data_;
+ std::vector<HandleType, typename Alloc::template rebind<HandleType>::other > data_;
 };
 
 template <typename ValueType,
@@ -148,7 +148,9 @@
         return data_.empty();
     }
 
- std::priority_queue<HandleType, std::vector<HandleType, Alloc>, compare_values_by_handle> data_;
+ std::priority_queue<HandleType,
+ std::vector<HandleType, typename Alloc::template rebind<HandleType>::other>,
+ compare_values_by_handle> data_;
 };
 
 

Modified: trunk/boost/heap/priority_queue.hpp
==============================================================================
--- trunk/boost/heap/priority_queue.hpp (original)
+++ trunk/boost/heap/priority_queue.hpp 2011-12-20 05:27:04 EST (Tue, 20 Dec 2011)
@@ -61,7 +61,8 @@
 
     typedef typename heap_base_maker::type super_t;
     typedef typename super_t::internal_type internal_type;
- typedef std::vector<internal_type, typename heap_base_maker::allocator_argument> container_type;
+ typedef typename heap_base_maker::allocator_argument::template rebind<internal_type>::other internal_type_allocator;
+ typedef std::vector<internal_type, internal_type_allocator> container_type;
 
     template <typename Heap1, typename Heap2>
     friend struct detail::heap_merge_emulate;


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