#include #include "boost/heap/binomial_heap.hpp" using namespace std; int main(int argc, char** argv) { typedef typename boost::heap::binomial_heap> Heap; typedef Heap::handle_type handle_t; Heap heap; handle_t t3 = heap.push(1); handle_t t5 = heap.push(2); handle_t t1 = heap.push(3); *t3 = 4; heap.update(t3); *t5 = 1; heap.update(t5); *t1 = 7; heap.update(t1); cout << "Priority Queue: update with fixup" << endl; while (!heap.empty()) { cout << heap.top() << " "; //result: 4, 7, 1 correct: 7 4 1 heap.pop(); } cout << endl; }