nark-hashmap icon indicating copy to clipboard operation
nark-hashmap copied to clipboard

return iterator on erase()?

Open perduamour opened this issue 8 years ago • 0 comments

Can gold_hash_map returns next valid iterator on erase(), just like std::unordered_map does? It's necessary in the scenario of deleting while looping.

auto iter = hashmap.begin(); while (iter != hashmap.end()) { if (some_conditon) { iter = hashmap.erase(iter); } else { ++iter; } }

perduamour avatar Jun 05 '17 07:06 perduamour