invalidate the iterators

H

heng

A lot of operations such as erase and popfront will invalidate
iterators of vector, however, what will happen to list? Is there any
influence to list?
Thanks a lot.
 
K

Kai-Uwe Bux

heng said:
A lot of operations such as erase and popfront will invalidate
iterators of vector, however, what will happen to list? Is there any
influence to list?

Insertions into a list do not invalidate any iterators. Erasing elements
from a list invalidates those and only those iterators pointing to that
element. [See 23.2.2.3]


Best

Kai-Uwe Bux
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top