I was wondering why the test below
end_iter_mem == intList.end()
return true
Shouldn't the end() "value" of the container evolves when (among other) container's number of elements increases ?
#include <iostream>
#include <list>
using namespace std;
int main()
{
list<int> intList = {1,2,3};
auto end_iter_mem = intList.end();
intList.push_back(4);
cout << (end_iter_mem == intList.end()) << endl;
return 0;
}