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

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 10 14:03:11 PST 2016


On Thu, Mar 10, 2016 at 2:00 PM, Dimitry Andric via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> dim added a subscriber: EricWF.
> dim added a comment.
>
> In http://reviews.llvm.org/D18061#372401, @dblaikie wrote:
>
> > Is this a bug in libstdc++ - should it be requiring/relying on the
> operand
> >  to have an ::iterator typedef?
>
>
> This compilation isn't using libstdc++, but libc++.  So if it's a bug in
> the C++ library, it's something in libc++...  However, I don't think so,
> really.  @EricWF, any opinions about this?
>

Ah, curious. Then this wouldn't be an issue with GCC version. I would
expect this to be evident with any compiler using that libc++?


>
> > (& even if it is a bug, perhaps we should still workaround it - but I'm
> not
>
> >  entirely sure what the right workaround is, perhaps we should just have
> our
>
> >  own begin/end that don't have this feature/bug)
>
>
> I'm not sure why reverse() doesn't just call .begin() and .end() on the
> argument.  There might have been a specific reason to use std::begin() and
> std::end().
>

The most obvious is that it would work with arrays, ideally - but there are
other containers that overload non-member begin/end to allow for iteration
as well. Though I'm not sure if I tested that, etc.


>
>
> http://reviews.llvm.org/D18061
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160310/4f376ad9/attachment.html>


More information about the llvm-commits mailing list