Enum member isOf

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

enum isOf(ab...) = is(resolve!(Ts[0]) == resolve!(Ts[1]));

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

Example

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));