hasNested

Determines whether T or any of its representation types have a context pointer.

template hasNested (
T
) {
enum hasNested;
enum hasNested;
enum hasNested;
}

Examples

static struct S { }

int i;
struct NS { void f() { ++i; } }

static assert(!hasNested!(S[2]));
static assert(hasNested!(NS[2]));

Meta

Suggestion Box / Bug Report