[PATCH] D45853: (WIP) Alternate approach to reversing filtered iterators
Vedant Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 19 18:01:33 PDT 2018
vsk created this revision.
vsk added reviewers: timshen, zturner, dblaikie.
This is an alternative approach to implementing support for reversed filtered iterator ranges.
It works by conditionally setting std::bidirectional_iterator_tag on the filter iterator. The advantage of this is that it makes the implementation of reverse() simpler (see https://reviews.llvm.org/D45792 for comparison). The downside is that it introduces copies of the wrapped begin/end iterators, as well as the predicate functor.
Please see the discussion in https://reviews.llvm.org/D45792 for context.
https://reviews.llvm.org/D45853
Files:
include/llvm/ADT/STLExtras.h
unittests/ADT/IteratorTest.cpp
unittests/IR/BasicBlockTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45853.143206.patch
Type: text/x-patch
Size: 6769 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180420/c5855678/attachment.bin>
More information about the llvm-commits
mailing list