r202968 - [C++11] Replace trivial lambda with std::cref.
Timur Iskhodzhanov
timurrrr at google.com
Wed Mar 5 04:56:52 PST 2014
FYI this breaks build on Windows with VS2013:
C:\Program Files (x86)\Microsoft Visual Studio
12.0\VC\INCLUDE\algorithm(1758) : error C2064: term does not evaluate
to a function taking 1 arguments
2014-03-05 15:38 GMT+04:00 Benjamin Kramer <benny.kra at googlemail.com>:
> 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) {
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list