Fixing the SortedRange
Martin Nowak
dawg at dawgfoto.de
Sun Mar 4 04:49:43 PST 2012
> That was my thought, though it could be very annoying to always check
> the docs for which way it goes. With some meta magic, it could be
> deduced like:
> If is(typeof(pred(ElementType!(Range).init,value) works then it's used
> as is.
> If the opposite order works, then pred is wrapped as !pred, and it's
> compiler job to optimize away this extra operation.
> I'll take a shot on it, to see how it works out.
>
Great. It's a big nuisance of std.algorithm.
More information about the Digitalmars-d
mailing list