canFind

Looks for T in L and returns $(D_KEYWORD true) if it could be found and $(D_KEYWORD false) otherwise.

  1. enum bool canFind(T, L...);
    enum bool canFind(T, L...);
  2. enum bool canFind(alias T, L...);

Return Value

$(D_KEYWORD true) if T can be found in L, $(D_KEYWORD false) otherwise.

Examples

static assert(!canFind!(int));
static assert(canFind!(int, int));
static assert(canFind!(int, float, double, int, real));
static assert(canFind!(3, () {}, uint, 5, 3));

Meta