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

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 2 16:09:05 PDT 2017


David Blaikie <dblaikie at gmail.com> writes:

> Oh, huh, yeah - right you are (I was rather hoping that "T&" would derive T
> as "const U" when passed a temporary, but as you've pointed out, it
> doesn't).
>
> Yeah, I'd be in favor of what you've done then - passing T&& so temporaries
> or locals can be passed by reference without undue copying in either case.

Sorry, what copying?

Since this is an algorithm and not an adapter, no copying is necessary,
right? If that is the case I think it is probably better to use "const
T&".

Cheers,
Rafael


More information about the llvm-commits mailing list