assumeSorted?
Steven Schveighoffer
schveiguy at yahoo.com
Tue Aug 24 07:42:45 PDT 2010
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
More information about the Digitalmars-d-learn
mailing list