Hi,

does the standard define what the iterator returned by container.end() points to?

Or the question represented in code:

Code:
vector<int> v;
vector<int>::iterator iter = v.end();
v.push_back(1);

assert( iter == v.end() ); //?
I see two possibilities:
1. iterator returned by container.end() is implemented as a special marker element which is always the same. in this case the assert should not fail
2. iterator returned by container.end() is dynamically derived from the last element of the container. in this case the assert should maybe fail

What does the standard say? Does the answer depend on the container typ?

Thank you in advance!