r202971 - Revert "[C++11] Replace trivial lambda with std::cref."

Benjamin Kramer benny.kra at googlemail.com
Wed Mar 5 05:25:00 PST 2014


Author: d0k
Date: Wed Mar  5 07:25:00 2014
New Revision: 202971

URL: http://llvm.org/viewvc/llvm-project?rev=202971&view=rev
Log:
Revert "[C++11] Replace trivial lambda with std::cref."

MSVC2013's standard library is too broken to understand this pattern.

Modified:
    cfe/trunk/lib/Driver/Multilib.cpp

Modified: cfe/trunk/lib/Driver/Multilib.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Multilib.cpp?rev=202971&r1=202970&r2=202971&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Multilib.cpp (original)
+++ cfe/trunk/lib/Driver/Multilib.cpp Wed Mar  5 07:25:00 2014
@@ -340,7 +340,9 @@ MultilibSet::filterCopy(const MultilibSe
 
 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) {





More information about the cfe-commits mailing list