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.

template staticFilter (
T...
) {
enum result;
enum result;
}

Examples

Example

1 import std.conv;
2 
3 bool testFunc(int val)
4 { 
5     return val <= 15;
6 }
7 
8 static assert(staticFilter!(testFunc, ExpressionList!(42, 108, 15, 2)) == ExpressionList!(15, 2));

Meta