
15 Sep
2008
15 Sep
'08
11:35 a.m.
joaquin@tid.es wrote:
Cannot you just resort to a manual for-loop like this?
multi_t mic; ... for(multi_t::iterator it=mic.begin(),it_end=mic.end();it!=it_end;){ if(pred(*it))it=mic.erase(it); else ++it; }
Btw.: Is this a documented feature that end() will not be invalidated by erase? Sorry, if this is a beginner's question, but I could not find such a statement in the docs (probably too blind). Greetings from Bremen, Daniel