summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/manual/cmake-developer.7.rst23
1 files changed, 23 insertions, 0 deletions
diff --git a/Help/manual/cmake-developer.7.rst b/Help/manual/cmake-developer.7.rst
index d5fbc98..8df2ca1 100644
--- a/Help/manual/cmake-developer.7.rst
+++ b/Help/manual/cmake-developer.7.rst
@@ -124,6 +124,29 @@ A loop must be used instead:
theVector.push_back(*li);
}
+std::set::insert
+----------------
+
+Use of ``std::set::insert`` is not allowed with any source container:
+
+.. code-block:: c++
+
+ std::set<cmTarget*> theSet;
+ theSet.insert(targets.begin(), targets.end()); // Wrong
+
+A loop must be used instead:
+
+.. code-block:: c++
+
+ ConstIterator it = targets.begin();
+ const ConstIterator end = targets.end();
+ for ( ; it != end; ++it)
+ {
+ theSet.insert(*it);
+ }
+
+.. MSVC6, SunCC 5.9
+
Template Parameter Defaults
---------------------------