[PATCH] D48348: [ADT] Add zip_longest iterators.
Michael Kruse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 3 16:35:51 PST 2018
Meinersbur marked 2 inline comments as done.
Meinersbur added inline comments.
================
Comment at: unittests/ADT/IteratorTest.cpp:333-334
+ using namespace std;
+ const vector<unsigned> pi{3, 1, 4, 1, 5, 9};
+ const vector<unsigned> e{2, 7, 1, 8};
+
----------------
dblaikie wrote:
> Meinersbur wrote:
> > dblaikie wrote:
> > > Wonder if it's worth testing with two different (& incompatible) types - like const char* in the second vector, for instance?
> > >
> > > Up to you.
> > Using StringRef which has an overloaded comparison operator. I get an ambiguity error if just using a literal string in the initializer_list of Optional<StringRef>, so there is an explicit conversion.
> Ah, cool - you might be able to get away with {...} instead of StringRef(...) if you like, but yeah, either's fine - thanks!
That worked. Thanks, looks nice like this.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D48348/new/
https://reviews.llvm.org/D48348
More information about the llvm-commits
mailing list