staticFilter

Performs filtering of expression tuple T one by one by function or template F. If F returns true the resulted element goes to returned expression tuple, else it is discarded.

Members

Aliases

staticFilter
alias staticFilter = ExpressionList!()
Undocumented in source.
staticFilter
alias staticFilter = ExpressionList!(T[0], staticFilter!(F, T[1..$]))
Undocumented in source.
staticFilter
alias staticFilter = ExpressionList!(staticFilter!(F, T[1..$]))
Undocumented in source.

Examples

Example

import std.conv;

bool testFunc(int val)
{ 
    return val <= 15;
}

template testTemplate(int val)
{
    enum testTemplate = val <= 15;
}

static assert(staticFilter!(testFunc, ExpressionList!(42, 108, 15, 2)) == ExpressionList!(15, 2));
static assert(staticFilter!(testTemplate, ExpressionList!(42, 108, 15, 2)) == ExpressionList!(15, 2));

Meta