[PATCH] D146231: [ADT] Add `llvm::range_size` function for generic ranges
Jakub Kuderski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 21 07:33:01 PDT 2023
kuhar added inline comments.
================
Comment at: llvm/include/llvm/ADT/STLExtras.h:2426
assert((sizeof...(Rest) == 0 ||
- all_equal({std::distance(adl_begin(First), adl_end(First)),
- std::distance(adl_begin(Rest), adl_end(Rest))...})) &&
+ all_equal({range_size(First), range_size(Rest)...})) &&
"Ranges have different length");
----------------
zero9178 wrote:
> Guessing you still need to rebase this ontop of https://reviews.llvm.org/D146340?
> Does that happen to also fix the compiler bug from that revision or will we still require the workaround using the intializer list?
Yes, this needs rebasing. I've just checked and the workaround is still necessary.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146231/new/
https://reviews.llvm.org/D146231
More information about the llvm-commits
mailing list