Merge pull request #1878 from WalterBright/fix11973

fix Issue 11973 - Please use any instead
This commit is contained in:
Andrei Alexandrescu 2014-01-24 23:26:33 -08:00
commit bcf2be7b9c

View file

@ -10950,8 +10950,12 @@ was succesful.
+/
template canFind(alias pred="a == b")
{
//Explictly Undocumented. It will be removed in December 2014.
deprecated("Please use any instead.") bool canFind(Range)(Range haystack)
/++
Returns $(D true) if and only if any value $(D v) found in the
input range $(D range) satisfies the predicate $(D pred).
Performs (at most) $(BIGOH r.length) evaluations of $(D pred).
+/
bool canFind(Range)(Range haystack)
if (is(typeof(find!pred(haystack))))
{
return any!pred(haystack);