mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-27 01:19:31 -05:00
cmGlobalNinjaGenerator: Avoid using deprecated std::ptr_fun
It was deprecated by C++11 and removed by C++17. Use a C++11 lambda.
This commit is contained in:
@@ -8,7 +8,6 @@
|
|||||||
#include "cmsys/FStream.hxx"
|
#include "cmsys/FStream.hxx"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <functional>
|
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <memory> // IWYU pragma: keep
|
#include <memory> // IWYU pragma: keep
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
@@ -114,7 +113,7 @@ std::string cmGlobalNinjaGenerator::EncodeIdent(const std::string& ident,
|
|||||||
std::ostream& vars)
|
std::ostream& vars)
|
||||||
{
|
{
|
||||||
if (std::find_if(ident.begin(), ident.end(),
|
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;
|
static unsigned VarNum = 0;
|
||||||
std::ostringstream names;
|
std::ostringstream names;
|
||||||
names << "ident" << VarNum++;
|
names << "ident" << VarNum++;
|
||||||
|
|||||||
Reference in New Issue
Block a user