feat(util/rb_map): add erase_min

This commit is contained in:
Leonardo de Moura 2015-11-08 17:29:30 -08:00
parent c1392e60be
commit 1d39b6d5d4

View file

@ -38,6 +38,13 @@ public:
unsigned get_rc() const { return m_map.get_rc(); }
T erase_min() {
lean_assert(!empty());
T r = m_map.min()->second;
m_map.erase_min();
return r;
}
class ref {
rb_map & m_map;
K const & m_key;