for (std::map<Int64,Int64>::iterator iter = ips_forbidden_.begin(); iter != ips_forbidden_.end();)
{
if (cur_time >= iter->second)
{
ips_forbidden_.erase(iter++);
}
else
{
++iter;
}
}
iter++返回当前的元素,而operator(int)内部已经对iter进行了+1操作,使iter指向下一个元素,这样iter就继续有效了