www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - assumeSorted?

What happened to assumeSorted in 2.048?

When trying to do a find on an assumeSorted range, it fails:

dcollections/HashSet.d(28): Error: template std.algorithm.find(alias pred  
= "a == b",R,E) if (isInputRange!(R) &&  
is(typeof(binaryFun!(pred)(haystack.front,needle)) : bool)) does not match  
any function template declaration
dcollections/HashSet.d(28): Error: template std.algorithm.find(alias pred  
= "a == b",R,E) if (isInputRange!(R) &&  
is(typeof(binaryFun!(pred)(haystack.front,needle)) : bool)) cannot deduce  
template function from argument types  
!()(AssumeSorted!(ubyte[],pred),ubyte)

WTF?  How do I do an efficient search now?

-Steve
Aug 24 2010