For which standard container, if any, is the iterator returned by end() persistent?
问题 I need a way to quickly access data in a container. So I remember iterator of that data position. Container maybe modified (elements added and removed) after that, but if I use container type that does not invalidate my iterator (like std::map or std::list ) I am fine. Also my data may not be in the container (yet), so I set an iterator to container.end() to reflect that. Which standard container guarantees that end() would not change when elements added and removed? So I can still compare my