I\'ve been up and down stackoverflow and even the very, very nice Dr. Dobbs article but I can\'t find a definitive answer to the question.
A section of the answer to
It should just be
std::list::reverse_iterator it = list.rbegin(); while( it != list.rend() ) { int value=*it; if( some_cond_met_on(value) ) { ++it; it= reverse_iterator(list.erase(it.base()); // change to this! } else { ++it; } }