On 07/19/2010 06:36 AM, Steven Schveighoffer wrote:
Just thinking out loud here, couldn't you use the predicate already in
AssumeSorted? I mean, if you're going to pass AssumeSorted into find,
you don't want to also specify the predicate as then the range just
becomes a standard range.

There must be some kind of way to use template constraints to kill the
predicate arg to find when the range is an AssumeSorted struct. If not,
there should be.

That's a good idea. The find predicate that could be derived from AssumeSorted's predicate pred would be !pred(a, b) && !pred(b, a).

Thanks, Steve.


Andrei

Reply via email to