diff --git a/Source/cmAlgorithms.h b/Source/cmAlgorithms.h index b6ea75a91b..69d0ed6a4e 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::const_iterator cmFindNot(Range const& r, T const& t) { - return std::find_if(r.begin(), r.end(), - std::bind1st(std::not_equal_to(), t)); + return std::find_if(r.begin(), r.end(), [&t](T const& i) { return i != t; }); } template diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index df02f84785..50ed0ed2e5 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -5,7 +5,6 @@ #include "cmsys/FStream.hxx" #include "cmsys/Terminal.h" #include -#include #include #include #include @@ -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(), prefix)); + [&prefix](std::string const& s) { return prefix + s; }); } }