diff options
Diffstat (limited to 'boost/heap/binomial_heap.hpp')
-rw-r--r-- | boost/heap/binomial_heap.hpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/boost/heap/binomial_heap.hpp b/boost/heap/binomial_heap.hpp index 7e0760f4a2..01ccf3fc8d 100644 --- a/boost/heap/binomial_heap.hpp +++ b/boost/heap/binomial_heap.hpp @@ -404,8 +404,13 @@ public: binomial_heap children(value_comp(), element->children, sz); if (trees.empty()) { stability_counter_type stability_count = super_t::get_stability_count(); + size_t size = constant_time_size ? size_holder::get_size() + : 0; swap(children); super_t::set_stability_count(stability_count); + + if (constant_time_size) + size_holder::set_size( size ); } else merge_and_clear_nodes(children); |