<div class="gmail_quote">On Tue, Jul 27, 2010 at 07:04, Andrei Alexandrescu <span dir="ltr"><<a href="mailto:SeeWebsiteForEmail@erdani.org">SeeWebsiteForEmail@erdani.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div></div><br></div><div class="im"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Also, I can't stop thinking that it's stand-alone find()'s job utilize whatever features the range has (be it random access, sortedness, or anything else) to execute fast, not the passed in range's.<br>
</blockquote>
<br></div>
Good point, though that reintroduces the question of comparing find's predicate with SortedRange's predicate.<div class="im"><br></div></blockquote><div><br>I really don't see how you would do that in a generic way... Even taking into account that predicates return a very simple value (bool) and that they terminate (well, the input range's one _was_ used to sort it), that's akin to determining if two unknown functions produce equal values.<br>
<br><br><br><br> <br></div></div>