<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Sep 23, 2015 at 5:19 PM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Wed, Sep 23, 2015 at 5:10 PM, Aaron Ballman via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On Wed, Sep 23, 2015 at 7:58 PM, Rui Ueyama via llvm-commits<br>
<<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br>
> Author: ruiu<br>
> Date: Wed Sep 23 18:58:29 2015<br>
> New Revision: 248447<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=248447&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=248447&view=rev</a><br>
> Log:<br>
> Add iterator_range::end() predicate.<br>
<br>
</span>Why is this required? I only ask because I was under the impression we<br>
wanted to keep this interface as similar to what may be standardized<br>
as possible, and I don't recall this as part of the current ranges<br>
proposal. However, I could be wrong as I've not checked the proposal<br>
in a while.<br></blockquote><div><br></div></span><div>+1, I'd rather avoid adding such members to range abstractions - instead, we should just have a non-member llvm::empty function (if we don't have one already) that takes a range (and uses std::begin/end on it) and returns a bool, etc.</div></div></div></div></blockquote><div><br></div><div>I was not really aware that this was trying to mimic the proposal, so I just thought that that's useful in general. Now that I know that, I'm rolling this back.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class=""><div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
~Aaron<br>
<div><div><br>
><br>
> Modified:<br>
> llvm/trunk/include/llvm/ADT/iterator_range.h<br>
><br>
> Modified: llvm/trunk/include/llvm/ADT/iterator_range.h<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/iterator_range.h?rev=248447&r1=248446&r2=248447&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/iterator_range.h?rev=248447&r1=248446&r2=248447&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/include/llvm/ADT/iterator_range.h (original)<br>
> +++ llvm/trunk/include/llvm/ADT/iterator_range.h Wed Sep 23 18:58:29 2015<br>
> @@ -45,6 +45,7 @@ public:<br>
><br>
> IteratorT begin() const { return begin_iterator; }<br>
> IteratorT end() const { return end_iterator; }<br>
> + bool empty() const { return begin_iterator == end_iterator; }<br>
> };<br>
><br>
> /// \brief Convenience function for iterating over sub-ranges.<br>
><br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></span></div><br></div></div>
</blockquote></div><br></div></div>