[PATCH] D18061: Add iterator types to iterator_range, to appease newer gcc's

Dimitry Andric via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 12 11:31:18 PST 2016

dim abandoned this revision.
dim added a comment.

Okay, nevermind about this change.  In FreeBSD, I have simply imported http://reviews.llvm.org/rL255585 for now (a full libc++ import will follow later).  Gcc wanted to see `iterator` and `const_iterator` types in `iterator_range`, when `_LIBCPP_HAS_NO_TRAILING_RETURN` is defined, because libc++'s <iterator> then uses the following kind of definitions for e.g. `std::begin()`:

  template <class _Cp>
  typename _Cp::iterator
  begin(_Cp& __c)
      return __c.begin();

E.g to be able to return anything, it needs to know the type.


More information about the llvm-commits mailing list