Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r80479 - trunk/boost/heap/detail
From: tim_at_[hidden]
Date: 2012-09-10 10:57:58


Author: timblechmann
Date: 2012-09-10 10:57:57 EDT (Mon, 10 Sep 2012)
New Revision: 80479
URL: http://svn.boost.org/trac/boost/changeset/80479

Log:
heap: mutable heap wrapper - we should copy the q_ for the compare class

fixes ticket no #7357

Text files modified:
   trunk/boost/heap/detail/mutable_heap.hpp | 3 ++-
   1 files changed, 2 insertions(+), 1 deletions(-)

Modified: trunk/boost/heap/detail/mutable_heap.hpp
==============================================================================
--- trunk/boost/heap/detail/mutable_heap.hpp (original)
+++ trunk/boost/heap/detail/mutable_heap.hpp 2012-09-10 10:57:57 EDT (Mon, 10 Sep 2012)
@@ -130,7 +130,7 @@
     {}
 
     priority_queue_mutable_wrapper(priority_queue_mutable_wrapper const & rhs):
- objects(rhs.objects)
+ q_(rhs.q_), objects(rhs.objects)
     {
         for (typename object_list::iterator it = objects.begin(); it != objects.end(); ++it)
             q_.push(it);
@@ -138,6 +138,7 @@
 
     priority_queue_mutable_wrapper & operator=(priority_queue_mutable_wrapper const & rhs)
     {
+ q_ = rhs.q_;
         objects = rhs.objects;
         q_.clear();
         for (typename object_list::iterator it = objects.begin(); it != objects.end(); ++it)


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