isNested

Determines whether T has its own context pointer. T must be either class, struct, or union.

See also: __traits(isNested, T)

template isNested (
T
) if (
is(T == class) ||
is(T == struct)
||
is(T == union)
) {
enum isNested;
}

Examples

static struct S { }
static assert(!isNested!S);

int i;
struct NestedStruct { void f() { ++i; } }
static assert(isNested!NestedStruct);

Meta