All books

Professional

Apps About Coach Log in Start reading

Computer Science · Glossary

What is Iterator invalidation?

Definition 5.4 University Computer Science — Year 2 · Chapter 5 — The Standard Library: Containers, Iterators and Algorithms

An operation on a container invalidates an iterator, a pointer or a reference to its elements when, after the operation, using it is undefined behaviour. The standard states, for each operation of each container, which ones it invalidates.

Read in context →