void erase(const KEY& key) { const_iterator it = findKey(key); if (it != m_contents.end()) { // Avoid std::vector.erase here due to bug in libstdc++ < v4.9 #if PONDER_WORKAROUND_GCC_N2350 std::size_t pos = it - m_contents.begin(); const std::size_t sz = m_contents.size() - 1; while (pos < sz) m_contents[pos] = m_contents[pos + 1], ++pos; m_contents.resize(sz); #else m_contents.erase(it); #endif } }
void erase(const_iterator_t position) { __container.erase(__position_to_iterator(position)); }