
15 Sep
2008
15 Sep
'08
11:07 a.m.
Robert Jones escribió:
My head is now exploding with understanding the full power and flexibility of multi-index-container, but still it is not clear to me how best to do the simple things!
What is the idiomatically 'correct' way to apply the equivalent functionality of the erase-remove idiom to a multi-index-container? [...]
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; } Joaquín M López Muñoz Telefónica, Investigación y Desarrollo