staticFilterN

Performs filtering of expression tuple T passing i elements to function or template F. If F returns true the resulted elements go to returned expression tuple, else it is discarded.

Members

Aliases

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

Examples

Example

template isNineSumm(int a, int b, int c) { enum isNineSumm = a + b + c == 9; }
static assert( staticEqual!( StrictExpressionList!(staticFilterN!(3, isNineSumm, 3, 3, 3, 1, 1, 1, 2, 4, 3)), StrictExpressionList!(ExpressionList!(3, 3, 3, 2, 4, 3)) ) );

Meta