summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-09-25 12:57:38 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-09-25 12:57:41 (GMT)
commitf29b9702e030ab4208b43ba27fcb3e66a1949485 (patch)
treebd8ae3283501171bcae63f682930914a9e55ec30
parentbb535bedc0ec95c046ef8685bd3c7877249cc55e (diff)
parent44d3a76d4af3aebcb9bcb15fc003010fd0ae1d76 (diff)
downloadCMake-f29b9702e030ab4208b43ba27fcb3e66a1949485.zip
CMake-f29b9702e030ab4208b43ba27fcb3e66a1949485.tar.gz
CMake-f29b9702e030ab4208b43ba27fcb3e66a1949485.tar.bz2
Merge topic 'cxx17-no-bind1st'
44d3a76d Avoid using std::bind1st that is removed in C++17 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1304
-rw-r--r--Source/cmAlgorithms.h3
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx3
2 files changed, 2 insertions, 4 deletions
diff --git a/Source/cmAlgorithms.h b/Source/cmAlgorithms.h
index b6ea75a..69d0ed6 100644
--- a/Source/cmAlgorithms.h
+++ b/Source/cmAlgorithms.h
@@ -370,8 +370,7 @@ std::string cmWrap(char prefix, Range const& r, char suffix,
template <typename Range, typename T>
typename Range::const_iterator cmFindNot(Range const& r, T const& t)
{
- return std::find_if(r.begin(), r.end(),
- std::bind1st(std::not_equal_to<T>(), t));
+ return std::find_if(r.begin(), r.end(), [&t](T const& i) { return i != t; });
}
template <typename Range>
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index df02f84..50ed0ed 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -5,7 +5,6 @@
#include "cmsys/FStream.hxx"
#include "cmsys/Terminal.h"
#include <algorithm>
-#include <functional>
#include <sstream>
#include <stdio.h>
#include <utility>
@@ -2073,7 +2072,7 @@ void cmLocalUnixMakefileGenerator3::CreateCDCommand(
std::string outputForExisting = this->ConvertToOutputForExisting(tgtDir);
std::string prefix = cd_cmd + outputForExisting + " && ";
std::transform(commands.begin(), commands.end(), commands.begin(),
- std::bind1st(std::plus<std::string>(), prefix));
+ [&prefix](std::string const& s) { return prefix + s; });
}
}