FilterTuple

Creates a generic tuple comprised of elemetns of A for which a unary predicate pred is true.

Members

Aliases

FilterTuple
alias FilterTuple = MapTuple!(func, A)
Undocumented in source.
PredTemplate
alias PredTemplate = UnaryTemplate!pred
Undocumented in source.

Templates

func
template func(A...)
Undocumented in source.

Examples

import std.traits;

static assert(is(FilterTuple!(isNumeric, int, void, immutable short, char) ==
              TypeTuple!(int, immutable short)));

static assert(is(FilterTuple!(`__traits(isUnsigned, T)`, int, size_t, void, ushort, char) ==
              TypeTuple!(size_t, ushort, char)));

Analog of $(STDREF algorithm, filter) for generic tuples.

Meta