diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-11-25 15:33:00 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-01-11 16:00:55 (GMT) |
commit | 36b8de563cab1933fb332c42bca68125dd13f35a (patch) | |
tree | 316553459c8252a7b8fb063a4cf22fbf240890df /Help/manual | |
parent | 6162c9194bfb416ac43f52f281db442a4d484aff (diff) | |
download | CMake-36b8de563cab1933fb332c42bca68125dd13f35a.zip CMake-36b8de563cab1933fb332c42bca68125dd13f35a.tar.gz CMake-36b8de563cab1933fb332c42bca68125dd13f35a.tar.bz2 |
Help: Remove documented restriction on insert APIs.
Diffstat (limited to 'Help/manual')
-rw-r--r-- | Help/manual/cmake-developer.7.rst | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/Help/manual/cmake-developer.7.rst b/Help/manual/cmake-developer.7.rst index 682ce47..2f98b02 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<const char*> theSet; - std::vector<std::string> theVector; - theVector.insert(theVector.end(), theSet.begin(), theSet.end()); // Wrong - -A loop must be used instead: - -.. code-block:: c++ - - std::set<const char*> theSet; - std::vector<std::string> theVector; - for(std::set<const char*>::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<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); - } - -.. SunCC 5.9 - Template Parameter Defaults --------------------------- |