Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这个问题澄清了迭代器在插入后仍然有效。我想更进一步,并要求验证这是预期的行为:
std::map
map
iterator++
这一切有意义吗?
如果新插入的元素在您正在访问的迭代器之后,这是正确的。