vs2005里List Iterator Not Incrementable?

当需要erase list里的元素时
代码可写为以下形式,可避免list iterator incrementable
std::list<int> T;
std::list<int>::iterator rpos;
for(rpos=T.begin();rpos!=T.end();)
rpos = T.erase(rpos);
原文地址:https://www.cnblogs.com/cloudseawang/p/840419.html