]> granicus.if.org Git - clang/commitdiff
Revert "[C++11] Replace trivial lambda with std::cref."
authorBenjamin Kramer <benny.kra@googlemail.com>
Wed, 5 Mar 2014 13:25:00 +0000 (13:25 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Wed, 5 Mar 2014 13:25:00 +0000 (13:25 +0000)
MSVC2013's standard library is too broken to understand this pattern.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202971 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/Multilib.cpp

index 4d72b93e54aed2c5e9423f3bd649ba9eafcd1c86..910e6383f28e33afe2c413ff7f5ffa5388fdfd36 100644 (file)
@@ -340,7 +340,9 @@ MultilibSet::filterCopy(const MultilibSet::FilterCallback &F,
 
 void MultilibSet::filterInPlace(const MultilibSet::FilterCallback &F,
                                 multilib_list &Ms) {
-  Ms.erase(std::remove_if(Ms.begin(), Ms.end(), std::cref(F)), Ms.end());
+  Ms.erase(std::remove_if(Ms.begin(), Ms.end(),
+                          [&F](const Multilib &M) { return F(M); }),
+           Ms.end());
 }
 
 raw_ostream &clang::driver::operator<<(raw_ostream &OS, const MultilibSet &MS) {