Past-the-end iterator invalidation in C++11

后端 未结 3 1352
说谎
说谎 2020-12-29 04:05

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()<

3条回答
  •  無奈伤痛
    2020-12-29 04:45

    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.

提交回复
热议问题