templateAnd

Combines multiple templates with logical AND. So $(D_PSYMBOL templateAnd) evaluates to Preds[0] && Preds[1] && Preds[2] and so on.

Empty Preds evaluates to $(D_KEYWORD true).

template templateAnd (
Preds...
) if (
allSatisfy!(isTemplate, Preds)
) {}

Members

Templates

templateAnd
template templateAnd(T...)
Undocumented in source.

Parameters

Preds

Template predicates.

Return Value

The constructed template.

Examples

alias isMutableInt = templateAnd!(isIntegral, isMutable);
static assert(isMutableInt!int);
static assert(!isMutableInt!(const int));
static assert(!isMutableInt!float);

alias alwaysTrue = templateAnd!();
static assert(alwaysTrue!int);

alias isIntegral = templateAnd!(.isIntegral);
static assert(isIntegral!int);
static assert(isIntegral!(const int));
static assert(!isIntegral!float);

Meta