anySatisfy

Tests whether any given items satisfy a template predicate, i.e. evaluates to F!(T[0]) || F!(T[1]) || ... || F!(T[$ - 1]).

Evaluation is short-circuited if a true result is encountered; the template predicate must be instantiable with one of the given items.

template anySatisfy (
T...
) {}

Examples

import std.traits : isIntegral;

static assert(!anySatisfy!(isIntegral, string, double));
static assert( anySatisfy!(isIntegral, int, double));
Suggestion Box / Bug Report