Both cppreference.com¹ and cplusplus.com² claim that erase
on a set
or map
container, if takes an iterator as its argument, is "amortized constant".
This gives few hints about its worst complexity. Can I hope it will never be worse than logarithmic? At least with reasonable implementations?
¹http://en.cppreference.com/w/cpp/container/map/erase#Complexity
²http://www.cplusplus.com/reference/map/map/erase/#complexity