Is there any way to check if an iterator (whether it is from a vector, a list, a deque...) is (still) dereferencable, i.e. has not been invalidated?
I have been usi
use erase with increment :
if (something) l.erase(itd++);
so you can test the validity of the iterator.