[PATCH] D36089: [ELF] - Replace parallelForEach with ranged form.

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 1 16:16:26 PDT 2017


George Rimar <grimar at accesssoftek.com> writes:

> I used LLVM algorithms like llvm::find_if, llvm::find as areference. 
> They use r-value and I think they do that to support constructions like:
> parallelForEach(std::vector<int>({1, 2, 3}), [](int) { ... });
>
> I could probably use "const R &Range" for supporting above, 
> but use of r-value is just consistent.

Pete, looks like you added the first one of these (all_of). Do you
remember why you used r-value instead of const references?

Thanks,
Rafael


More information about the llvm-commits mailing list