isAddress

Is true iff T is repesented as a memory address.

@safe
template isAddress (
T
) {
enum isAddress;
enum isAddress;
}

Examples

static assert( isAddress!(int*));
static assert(!isAddress!(int));

class C {}
static assert( isAddress!(C));

struct S {}
static assert(!isAddress!(S));
static assert( isAddress!(S*));

Meta