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

Frederich Munch via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 30 15:04:05 PDT 2017


marsupial 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) {
----------------
chandlerc wrote:
> 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.
Doing that right and making sure includes are updated properly seems like a lengthy process (which I personally don't have time for right now).

The hint seems adequate to those trying to glean where these may be located, but if it's not wanted I can close this out all together.


https://reviews.llvm.org/D33651





More information about the llvm-commits mailing list