[Cmake-commits] CMake branch, next, updated. v2.8.12.1-7289-g6a4a017

Brad King brad.king at kitware.com
Mon Jan 27 13:03:13 EST 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  6a4a0178bcb59285ee77846e8faf3943be4f115a (commit)
       via  ed632736e380553866a1e6edde3767c067819b6f (commit)
       via  cc04bb6c16fba66b8d73807d5e4a397d6450a6b7 (commit)
      from  0a7c646df06e81beb2a73be9d72b65f876ee2e1c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6a4a0178bcb59285ee77846e8faf3943be4f115a
commit 6a4a0178bcb59285ee77846e8faf3943be4f115a
Merge: 0a7c646 ed63273
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Jan 27 13:03:12 2014 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Jan 27 13:03:12 2014 -0500

    Merge topic 'disallowed-cxx-subset' into next
    
    ed632736 Help: Note that std::string::clear may not be used.
    cc04bb6c Help: Document non-use of std::set::insert.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ed632736e380553866a1e6edde3767c067819b6f
commit ed632736e380553866a1e6edde3767c067819b6f
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Jan 24 15:46:31 2014 +0100
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Jan 27 13:02:59 2014 -0500

    Help: Note that std::string::clear may not be used.
    
    As found in commit 519c0a5d (Can't use std::string::clear() in
    cmake., 2012-09-15).

diff --git a/Help/manual/cmake-developer.7.rst b/Help/manual/cmake-developer.7.rst
index 8df2ca1..d169e1a 100644
--- a/Help/manual/cmake-developer.7.rst
+++ b/Help/manual/cmake-developer.7.rst
@@ -33,17 +33,19 @@ The ``at()`` member function of ``std::vector`` may not be used. Use
   int i1 = someVec.at(5); // Wrong
   int i2 = someVec[5];    // Ok
 
-std::string::append
--------------------
+std::string::append and std::string::clear
+------------------------------------------
 
-The ``append()`` member function of ``std::string`` may not be used. Use
-``operator+=`` instead:
+The ``append()`` and ``clear()`` member functions of ``std::string`` may not
+be used. Use ``operator+=`` and ``operator=`` instead:
 
 .. code-block:: c++
 
   std::string stringBuilder;
   stringBuilder.append("chunk"); // Wrong
+  stringBuilder.clear(); // Wrong
   stringBuilder += "chunk";      // Ok
+  stringBuilder = "";      // Ok
 
 std::set const iterators
 ------------------------

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cc04bb6c16fba66b8d73807d5e4a397d6450a6b7
commit cc04bb6c16fba66b8d73807d5e4a397d6450a6b7
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Jan 24 15:44:16 2014 +0100
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Jan 27 13:02:59 2014 -0500

    Help: Document non-use of std::set::insert.
    
    As found in commit 8e7c207e (Use a manual loop to insert into
    set::set., 2012-09-15).

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
 ---------------------------
 

-----------------------------------------------------------------------

Summary of changes:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list