We can just make the predicate be a normal function pointer instead of taking a template argument. This may reduce the amount of code generated without inhibiting the compiler from inlining the lambdas if it thought it were profitable. http://reviews.llvm.org/D4220