summaryrefslogtreecommitdiff
path: root/boost/heap/binomial_heap.hpp
diff options
context:
space:
mode:
authorAnas Nashif <anas.nashif@intel.com>2013-08-26 08:15:55 -0400
committerAnas Nashif <anas.nashif@intel.com>2013-08-26 08:15:55 -0400
commitbb4dd8289b351fae6b55e303f189127a394a1edd (patch)
tree77c9c35a31b1459dd7988c2448e797d142530c41 /boost/heap/binomial_heap.hpp
parent1a78a62555be32868418fe52f8e330c9d0f95d5a (diff)
downloadboost-bb4dd8289b351fae6b55e303f189127a394a1edd.tar.gz
boost-bb4dd8289b351fae6b55e303f189127a394a1edd.tar.bz2
boost-bb4dd8289b351fae6b55e303f189127a394a1edd.zip
Imported Upstream version 1.51.0upstream/1.51.0
Diffstat (limited to 'boost/heap/binomial_heap.hpp')
-rw-r--r--boost/heap/binomial_heap.hpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/boost/heap/binomial_heap.hpp b/boost/heap/binomial_heap.hpp
index 742754f68d..8ebc7d056f 100644
--- a/boost/heap/binomial_heap.hpp
+++ b/boost/heap/binomial_heap.hpp
@@ -62,6 +62,10 @@ struct make_binomial_heap_base
{}
#ifdef BOOST_HAS_RVALUE_REFS
+ type(type const & rhs):
+ base_type(rhs), allocator_type(rhs)
+ {}
+
type(type && rhs):
base_type(std::move(static_cast<base_type&>(rhs))),
allocator_type(std::move(static_cast<allocator_type&>(rhs)))
@@ -145,6 +149,7 @@ private:
typedef typename base_maker::compare_argument value_compare;
typedef typename base_maker::allocator_type allocator_type;
+ typedef typename base_maker::node_type node;
typedef typename allocator_type::pointer node_pointer;
typedef typename allocator_type::const_pointer const_node_pointer;
@@ -569,7 +574,8 @@ public:
/// \copydoc boost::heap::d_ary_heap_mutable::s_handle_from_iterator
static handle_type s_handle_from_iterator(iterator const & it)
{
- return handle_type(&*it);
+ node_type * ptr = const_cast<node_type *>(it.get_node());
+ return handle_type(ptr);
}
/// \copydoc boost::heap::priority_queue::value_comp