mirror of
https://github.com/dlang/phobos.git
synced 2025-04-27 13:40:20 +03:00
Document non-short-circuiting behavior of allSatisfy/anySatisfy.
This commit is contained in:
parent
41cca054a5
commit
395e360d74
1 changed files with 6 additions and 0 deletions
|
@ -560,6 +560,9 @@ unittest
|
|||
Tests whether all given items satisfy a template predicate, i.e. evaluates to
|
||||
$(D F!(T[0]) && F!(T[1]) && ... && F!(T[$ - 1])).
|
||||
|
||||
Evaluation is $(I not) short-circuited if a false result is encountered; the
|
||||
template predicate must be instantiable with all the given items.
|
||||
|
||||
Example:
|
||||
----
|
||||
static assert(!allSatisfy!(isIntegral, int, double));
|
||||
|
@ -592,6 +595,9 @@ unittest
|
|||
Tests whether all given items satisfy a template predicate, i.e. evaluates to
|
||||
$(D F!(T[0]) || F!(T[1]) || ... || F!(T[$ - 1])).
|
||||
|
||||
Evaluation is $(I not) short-circuited if a true result is encountered; the
|
||||
template predicate must be instantiable with all the given items.
|
||||
|
||||
Example:
|
||||
----
|
||||
static assert(!anySatisfy!(isIntegral, string, double));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue