r202968 - [C++11] Replace trivial lambda with std::cref.
Benjamin Kramer
benny.kra at googlemail.com
Wed Mar 5 03:38:19 PST 2014
Author: d0k
Date: Wed Mar 5 05:38:18 2014
New Revision: 202968
URL: http://llvm.org/viewvc/llvm-project?rev=202968&view=rev
Log:
[C++11] Replace trivial lambda with std::cref.
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=202968&r1=202967&r2=202968&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Multilib.cpp (original)
+++ cfe/trunk/lib/Driver/Multilib.cpp Wed Mar 5 05:38:18 2014
@@ -340,9 +340,7 @@ MultilibSet::filterCopy(const MultilibSe
void MultilibSet::filterInPlace(const MultilibSet::FilterCallback &F,
multilib_list &Ms) {
- Ms.erase(std::remove_if(Ms.begin(), Ms.end(),
- [&F](const Multilib &M) { return F(M); }),
- Ms.end());
+ Ms.erase(std::remove_if(Ms.begin(), Ms.end(), std::cref(F)), Ms.end());
}
raw_ostream &clang::driver::operator<<(raw_ostream &OS, const MultilibSet &MS) {
More information about the cfe-commits
mailing list