mirror of
https://github.com/dlang/phobos.git
synced 2025-04-29 06:30:28 +03:00
Merge pull request #1878 from WalterBright/fix11973
fix Issue 11973 - Please use any instead
This commit is contained in:
commit
bcf2be7b9c
1 changed files with 6 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue