Quote Originally Posted by Yadrif View Post
But that will drop all elements not just what was copied with std::copy.
Correct; to remove just those elements, use the version of erase() taking two iterators.