[C++11] Replace trivial lambda with std::cref.