Skip to content

Iterator Validity

Gustav Louw edited this page Dec 21, 2020 · 3 revisions

While CTL containers share similar iterator validity rules (eg. with foreach) with that of the STL, CTL iterators are best used with one rule in mind:

  1. Elements must not be added, removed, or sorted, to or on a container while iteration is being performed on the container.
Clone this wiki locally