explicit PriorityQueue(const _Compare& __comp = _Compare(), const _Sequence& __s = _Sequence(), const _Map& __m = _Map()) : c(__s), m(__m), comp(__comp) { make_heap(c.begin(), c.end(), comp); }
PriorityQueue(_InputIterator __first, _InputIterator __last, const _Compare& __comp = _Compare(), const _Sequence& __s = _Sequence(), const _Map& __m = _Map()) : c(__s), m(__m), comp(__comp) { c.insert(c.end(), __first, __last); make_heap(c.begin(), c.end(), comp); }
const_iterator end() const { return c.end(); }
iterator begin() { return c.begin(); }
const_iterator begin() const { return c.begin(); }
void make_heap() { std::make_heap(c.begin(), c.end(), static_cast<_Compare&>(*this)); }
void push_back(const value_type& x) { c.push_back(x); }
void pop() { std::pop_heap(c.begin(), c.end(), static_cast<_Compare&>(*this)); c.pop_back(); }
// a conventional interface... const_reference top() { return c.front(); }
void reserve(size_type x) { c.reserve(x); }
void clear() { c.clear(); }
size_type size() const { return c.size(); }
bool empty() const { return c.empty(); }
void pop() { pop_heap(c.begin(), c.end(), comp); c.pop_back(); }
void push(const value_type& __x) { c.push_back(__x); push_heap(c.begin(), c.end(), comp); }
iterator end() { return c.end(); }
void swap(std_heap& x) { std::swap(static_cast<_Compare&>(*this), static_cast<_Compare&>(x)); c.swap(x.c); }
void push(const value_type& x) { c.push_back(x); std::push_heap(c.begin(), c.end(), static_cast<_Compare&>(*this)); }