[PATCH] D84690: Make iterators of BitVector easier to use by inheriting iterator_facade_base

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 28 10:17:26 PDT 2020


dblaikie accepted this revision.
dblaikie added a comment.

In D84690#2177066 <https://reviews.llvm.org/D84690#2177066>, @thegameg wrote:

> I had an attempt here: https://reviews.llvm.org/D33419, I think similar concerns came up in that review.

Indeed, sorry that fell through & I didn't understand enough about iterators to instead suggest falling back to an input iterator instead of figuring out how to fit the semantics of the forward iterator. Perhaps after this is committed you could resurrect your original patch to remove the op!= and maybe add the extra checks you were proposing to the facade?

In D84690#2177876 <https://reviews.llvm.org/D84690#2177876>, @jdh8 wrote:

> BitVector's iterator should be an input iterator instead of a forward iterator
> because it is bound to no `unsigned` object

Great, thanks!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84690/new/

https://reviews.llvm.org/D84690



More information about the llvm-commits mailing list