trCTFilter

Like trFilter, but evaluates pred at compile-time with each element's type.

trCTFilter
(
alias pred
R
)
(
auto ref R r
)

Examples

enum isNumeric(T) = is(typeof(cast(int)T.init));
int[] results;
trOnly(1, 2., "3", '\x04')
	.trCTFilter!isNumeric
	.trEach!((n) { results ~= cast(int)n; });
assert(results == [1, 2, 4]);

Meta