if (it->Update()) { it = numbers.erase(it);} else { ++it;}
But at this point, it makes more sense to make use of remove_if:
// First a little setup work...struct Updater { bool operator()(const Thing& t) { return t.Update(); }};std::list<Thing> myThings;// ...// This line doesn't need to be changed if you change to a different container :Dstd::erase(std::remove_if(myThings.begin(), myThings.end(), Updater()), myThings.end());