[PATCH] D22951: [ADT] Add filter_iterator for filtering elements

Tim Shen via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 12 14:42:03 PDT 2016


timshen added inline comments.

================
Comment at: include/llvm/ADT/STLExtras.h:321
@@ +320,3 @@
+iterator_range<filter_iterator<detail::IterOfRange<RangeT>, PredicateT>>
+make_filter_range(RangeT &&Range, PredicateT Pred) {
+  using FilterIteratorT =
----------------
Yeah we can talk about that later.

One quick argument of not naming it to "filter" is that, it's so general that people may think of other possibilities by looking at the name, e.g. in-place filtering of a container or something.


https://reviews.llvm.org/D22951





More information about the llvm-commits mailing list