[Cmake-commits] CMake branch, next, updated. v2.8.12.1-7267-gf18b26a
Stephen Kelly
steveire at gmail.com
Fri Jan 24 10:05:07 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 f18b26a42627ac731ce1f9b1df71f8b2a46071f1 (commit)
via d135d3d7e97d411bd1dc1e954f0a3d0f815f87b9 (commit)
via ce34beaa53561eb0ceb7a994923b797b0077f19e (commit)
via 0183ede2ccd2fb96bc781c1e26999ced3588cf60 (commit)
from 8e0e72ccdf62af818a8d648fccf1b602f60a9154 (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=f18b26a42627ac731ce1f9b1df71f8b2a46071f1
commit f18b26a42627ac731ce1f9b1df71f8b2a46071f1
Merge: 8e0e72c d135d3d
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Jan 24 10:05:06 2014 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Jan 24 10:05:06 2014 -0500
Merge topic 'disallowed-cxx-subset' into next
d135d3d7 Help: Note that std::string::clear may not be used.
ce34beaa Help: Document non-use of std::set::insert.
0183ede2 CMake Nightly Date Stamp
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d135d3d7e97d411bd1dc1e954f0a3d0f815f87b9
commit d135d3d7e97d411bd1dc1e954f0a3d0f815f87b9
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Jan 24 15:46:31 2014 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Jan 24 16:04:24 2014 +0100
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 1ab1dec..dc76411 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=ce34beaa53561eb0ceb7a994923b797b0077f19e
commit ce34beaa53561eb0ceb7a994923b797b0077f19e
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri Jan 24 15:44:16 2014 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Fri Jan 24 16:04:16 2014 +0100
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..1ab1dec 100644
--- a/Help/manual/cmake-developer.7.rst
+++ b/Help/manual/cmake-developer.7.rst
@@ -124,6 +124,27 @@ A loop must be used instead:
theVector.push_back(*li);
}
+std::set::insert
+----------------
+
+Use of ``std::set::insert`` is not allowed with a source set:
+
+.. code-block:: c++
+
+ std::set<cmTarget*> theSet;
+ theSet.insert(targets.begin(), targets.end()); // Wrong
+
+A loop must be used instead:
+
+.. code-block:: c++
+
+ std::set<cmTarget*>::const_iterator it = targets.begin();
+ const std::set<cmTarget*>::const_iterator end = targets.end();
+ for ( ; it != end; ++it)
+ {
+ theSet.insert(*it);
+ }
+
Template Parameter Defaults
---------------------------
-----------------------------------------------------------------------
Summary of changes:
Help/manual/cmake-developer.7.rst | 31 +++++++++++++++++++++++++++----
Source/CMakeVersion.cmake | 2 +-
2 files changed, 28 insertions(+), 5 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list