isOf

Checks if the resolved type of one thing is the same as the resolved type of another thing.

If the type is callable, then std.traits.ReturnType is the resolved type

template isOf (
ab...
) if (
ab.length == 2
) {}

Members

Aliases

Ts
alias Ts = TypesOf!ab
Undocumented in source.

Manifest constants

isOf
enum isOf;
Undocumented in source.

Templates

resolve
template resolve(T)
Undocumented in source.

Examples

static assert( isOf!(int, 3));
static assert( isOf!(7, 3));
static assert( isOf!(3, int));
static assert(!isOf!(float, 3));
static assert(!isOf!(float, string));
static assert(!isOf!(string, 3));

string tostr() { return ""; }
static assert( isOf!(string, tostr));

Meta