[PATCH] D48348: [ADT] Add zip_longest iterators.

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 2 20:55:52 PDT 2018


Meinersbur added a comment.

In https://reviews.llvm.org/D48348#1144008, @dblaikie wrote:

> In https://reviews.llvm.org/D48348#1143128, @Meinersbur wrote:
>
> > Getting the size may require iterating the sequence in advance, which I tried to avoid in https://reviews.llvm.org/D48100.
>
>
> Yeah, it's a tradeoff there, to be sure. Not sure if anyone else has thoughts on the design tradeoffs here - would hope other folks might chime in.


IMHO this violates the don't-pay-for-what-you-don't-use <https://llvm.org/docs/CodingStandards.html#do-not-use-rtti-or-exceptions> principle.

In https://reviews.llvm.org/D48348#1185185, @hfinkel wrote:

> Hrmm. Can we have an Optional of a reference?


Currently, trying to use `Optional<int&>` results in a compile error (two of Optional's constructors fall together). Note sure how the implementation of Optional can be (whether it makes sense to) changed.


Repository:
  rL LLVM

https://reviews.llvm.org/D48348





More information about the llvm-commits mailing list