From 7c663d00eeea346813bb7ebcc36ac042b03e7688 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Fri, 25 Sep 2009 14:10:30 +0200 Subject: Doc: Document that iterators become invalid when the container is modified. Implicit sharing makes this a bit of a trap, since the iterator continues to function, but only on the data in the copies. --- doc/src/frameworks-technologies/containers.qdoc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/src/frameworks-technologies/containers.qdoc b/doc/src/frameworks-technologies/containers.qdoc index d29ca0e..0ac9732 100644 --- a/doc/src/frameworks-technologies/containers.qdoc +++ b/doc/src/frameworks-technologies/containers.qdoc @@ -267,7 +267,10 @@ Iterators provide a uniform means to access items in a container. Qt's container classes provide two types of iterators: Java-style - iterators and STL-style iterators. + iterators and STL-style iterators. Iterators of both types are + invalidated when the data in the container is modified or detached + from \l{Implicit Sharing}{implicitly shared copies} due to a call + to a non-const member function. \section2 Java-Style Iterators -- cgit v0.12