From 36b8de563cab1933fb332c42bca68125dd13f35a Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Tue, 25 Nov 2014 16:33:00 +0100 Subject: [PATCH] Help: Remove documented restriction on insert APIs. --- Help/manual/cmake-developer.7.rst | 47 ------------------------------- 1 file changed, 47 deletions(-) diff --git a/Help/manual/cmake-developer.7.rst b/Help/manual/cmake-developer.7.rst index 682ce47ba..2f98b02a1 100644 --- a/Help/manual/cmake-developer.7.rst +++ b/Help/manual/cmake-developer.7.rst @@ -54,53 +54,6 @@ Some implementations have a ``std::auto_ptr`` which can not be used as a return value from a function. ``std::auto_ptr`` may not be used. Use ``cmsys::auto_ptr`` instead. -std::vector::insert and std::set --------------------------------- - -Use of ``std::vector::insert`` with an iterator whose ``element_type`` requires -conversion is not allowed: - -.. code-block:: c++ - - std::set theSet; - std::vector theVector; - theVector.insert(theVector.end(), theSet.begin(), theSet.end()); // Wrong - -A loop must be used instead: - -.. code-block:: c++ - - std::set theSet; - std::vector theVector; - for(std::set::iterator li = theSet.begin(); - li != theSet.end(); ++li) - { - theVector.push_back(*li); - } - -std::set::insert ----------------- - -Use of ``std::set::insert`` is not allowed with any source container: - -.. code-block:: c++ - - std::set 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); - } - -.. SunCC 5.9 - Template Parameter Defaults ---------------------------