[PATCH] D146231: [ADT] Add `llvm::range_size` function for generic ranges
Markus Böck via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 21 05:01:14 PDT 2023
zero9178 accepted this revision.
zero9178 added a comment.
This revision is now accepted and ready to land.
LGTM with tiny note
================
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");
----------------
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?
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