#include struct compare { bool operator()(const int n1, const int n2) const { return n1 > n2; } }; int main() { boost::heap::binomial_heap> h; boost::heap::binomial_heap>::handle_type ref; int vals[] = {1, 4, 3, 2, 1, 3}; for (int i = 0; i < sizeof(vals)/sizeof(int); i++) ref = h.push(vals[i]); h.decrease(ref, -1); while (!h.empty()) { printf("%d\n", h.top()); h.pop(); } }