Hi! Another newbie question:
Is there any way to check if a iterator (whether it is from a vector, a list, a deque...) is (still) dereferencable, i.e has not been invalidated ? If so, which is the best way, in your opinion? (I was 'trying' and 'catching' :/)
Thanks again!
Edit: An example (which doesn't work)
list<int>l;
for (i=1; i<10; i++) l.push_back(i*10);
itd=l.begin();
itd++;
if (something) l.erase(itd);
/* now, in other place.. check if itd points to somewhere meaningful */
if (itd != l.end())
{
// blablabla
}