--------------------------------
std::list<int> l;
std::list<int>::iterator it1 = l.insert(l.end(), 1);
std::list<int>::iterator it2 = l.insert(l.end(), 2);
std::list<int>::iterator it3 = l.end();
l.clear();
// it1, it2 are now invalid.
// *** QUESTION 1: is it3 invalid now?
// *** QUESTION 2: is l.end() below the same as l.end() when
// it3 was first initialized?
if (it3 == l.end())
std::cout << "Unassigned\n";
--------------------------------
Thank you
"Noir" <no...@invalid.com> wrote in message
news:4c6a84bc$0$12127$4faf...@reader4.news.tin.it...
"No *other* iterators, pointers, or references are invalidated when
inserting or erasing any items.", so an end() iterator is not invalidated
after calling clear().
/Leigh