And that will invalidate your iterator `it`. Why don't you use integer index as iterator? That way the exiting `remove_item` function can be used.

Alternative: let the new `remove_item` return the result of `erase`:
```
std::vector<vehicle_part>::iterator vehicle::remove_item(int part, std::vector<vehicle_part>::iterator it)
{
    return parts[part].items.erase(it);
}
```