Does the following give defined results in terms of the C++ standard?
std::list<int> myList;
std::list<int>::iterator myIter = myList.begin(); // any issues?
myList.push_back( 123 );
myIter++; // will myIter point to the 123 I pushed?
I can test this out on the compiler I'm using... but I'd like a more definitive answer.
See Question&Answers more detail:os