Erase-remove idiom: what happens when remove return past-the-end-iterator?
I got this question when I was reading erase-remove idiom (item 32) from Scott Meyers "Effective STL” book. vector<int> v; ... v.erase(remove(v.begin(), v.end(), 99), v.end()); remove basically returns the "new logical end” and elements of the original range that start at the "new logical end" of the range and continue until the real...