[PATCH] D33651: Add note for location of other convenience functions.

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 30 13:40:27 PDT 2017


chandlerc added inline comments.


================
Comment at: include/llvm/ADT/iterator_range.h:75-87
+template <typename T>
+iterator_range<typename T::reverse_iterator> reverse_range(T &C) {
+  return iterator_range<typename T::reverse_iterator>(C.rbegin(), C.rend());
+}
+
+template <typename T>
+iterator_range<typename T::const_iterator> make_range(const T &C) {
----------------
marsupial wrote:
> majnemer wrote:
> > Doesn't `reverse_range` duplicate the `reverse` we already have in STLExtras.h?
> Thats all I really wanted...Should I add a comment it's there?
Personally, I think we should move the range-based utilities out of STLExtras.h and into a header that is more likely to be found. Either this one or something quite clearly providing range-based algos and adapters.


https://reviews.llvm.org/D33651





More information about the llvm-commits mailing list