<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Tue, Oct 30, 2018 at 4:39 PM Matthias Braun via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">MatzeB added a comment.<br>
<br>
In <a href="https://reviews.llvm.org/D53909#1281525" rel="noreferrer" target="_blank">https://reviews.llvm.org/D53909#1281525</a>, @dblaikie wrote:<br>
<br>
> (maybe some unit tests?)<br>
><br>
> Also, what about having only a single implementation:<br>
><br>
>   template <typename Range><br>
>   constexpr bool empty(const Range &r) {<br>
>     return adl_begin(r) == adl_end(r);<br>
>   }<br>
>   <br>
><br>
> Not sure why the standard library doesn't do it this way, but there are probably good reasons... though maybe they don't apply to us/llvm?<br>
<br>
<br>
What if the container has an optimized empty() method that works faster than actually producing begin and end iterators?<br></blockquote><div><br>Good point... & yeah, worth doing something the same way as the standard.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
Repository:<br>
  rL LLVM<br>
<br>
<a href="https://reviews.llvm.org/D53909" rel="noreferrer" target="_blank">https://reviews.llvm.org/D53909</a><br>
<br>
<br>
<br>
</blockquote></div></div>