[PATCH] D45792: [ADT] Teach reverse() about filter_iterator ranges
Zachary Turner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 19 14:10:47 PDT 2018
zturner added a comment.
In https://reviews.llvm.org/D45792#1072601, @timshen wrote:
> My understanding is that, the reason why reverse_iterator<filter_iterator<I, F>> doesn't "just work" is because filter_iterator<I> is only a forward_iterator, while reverse_iterator expects a bidirectional_iterator. Can we make filter_iterator bidirectional instead?
Yea it seems like `filter_iterator` should be bidirectional if and only if the underlying range is bidirectional.
https://reviews.llvm.org/D45792
More information about the llvm-commits
mailing list