diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-01-24 14:46:31 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-01-27 18:02:59 (GMT) |
commit | ed632736e380553866a1e6edde3767c067819b6f (patch) | |
tree | 4d426ccdfa7ce004a54d7256dc9594404f0bf211 /Help | |
parent | cc04bb6c16fba66b8d73807d5e4a397d6450a6b7 (diff) | |
download | CMake-ed632736e380553866a1e6edde3767c067819b6f.zip CMake-ed632736e380553866a1e6edde3767c067819b6f.tar.gz CMake-ed632736e380553866a1e6edde3767c067819b6f.tar.bz2 |
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).
Diffstat (limited to 'Help')
-rw-r--r-- | Help/manual/cmake-developer.7.rst | 10 |
1 files changed, 6 insertions, 4 deletions
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 ------------------------ |