The most popular post on C++ Iterator invalidation rules claims that it\'s not clear if the past-the-end iterators (i.e., those returned by end(), cend()<
You should be able to trust it if the standard says the operation will not invalidate iterators. Anything else should be treated as a bug in the standard library implementation.