diff options
author | Brad King <brad.king@kitware.com> | 2017-12-07 14:33:43 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-12-21 13:05:23 (GMT) |
commit | 05af537ecc6b89af5f0bb8051b63d08fb105e36b (patch) | |
tree | a57fbb72399183f7d47c8895608bab937563746c | |
parent | 258e6f1b1e1d20bc48a5892f5d9d339269fa2704 (diff) | |
download | CMake-05af537ecc6b89af5f0bb8051b63d08fb105e36b.zip CMake-05af537ecc6b89af5f0bb8051b63d08fb105e36b.tar.gz CMake-05af537ecc6b89af5f0bb8051b63d08fb105e36b.tar.bz2 |
cmGlobalNinjaGenerator: Avoid using deprecated std::ptr_fun
It was deprecated by C++11 and removed by C++17. Use a C++11 lambda.
-rw-r--r-- | Source/cmGlobalNinjaGenerator.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index d5531cb..4f546bb 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -8,7 +8,6 @@ #include "cmsys/FStream.hxx" #include <algorithm> #include <ctype.h> -#include <functional> #include <iterator> #include <memory> // IWYU pragma: keep #include <sstream> @@ -114,7 +113,7 @@ std::string cmGlobalNinjaGenerator::EncodeIdent(const std::string& ident, std::ostream& vars) { if (std::find_if(ident.begin(), ident.end(), - std::not1(std::ptr_fun(IsIdentChar))) != ident.end()) { + [](char c) { return !IsIdentChar(c); }) != ident.end()) { static unsigned VarNum = 0; std::ostringstream names; names << "ident" << VarNum++; |