staticFilterLookbehindN

Performs filtering of expression tuple T passing i elements to function or template F. If F returns true the last element go to returned expression tuple and "window" is moved behind T by 1 element. First i-1 elements goes to resulted tuple without checks.

Filtering starts from last element.

Members

Aliases

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

Examples

Example

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

Meta