[PATCH] D138858: [ADT] Clarify `zip` behavior with iteratees of different lengths. NFC.
Jakub Kuderski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 28 16:31:24 PST 2022
kuhar added inline comments.
================
Comment at: llvm/include/llvm/ADT/STLExtras.h:882-884
/// zip iterator that, for the sake of efficiency, assumes the first iteratee to
-/// be the shortest.
+/// be the shortest. Iteration continues until the end of the first iteratee is
+/// reached.
----------------
kuhar wrote:
> dblaikie wrote:
> > Worth mentioning what values are used to fill in if the second iteratee isn't long enough?
> Unless I'm mistaken, that's just UB. The first sentence explains that `zip_first` assumes that the first iteratee is the shortest.
>
> Do you see some better wording here?
Actually, maybe that would deserve it's own assertion as well.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138858/new/
https://reviews.llvm.org/D138858
More information about the llvm-commits
mailing list