isNested

Determines whether T is a nested type, i.e. $(D_KEYWORD class), $(D_KEYWORD struct) or $(D_KEYWORD union), which internally stores a context pointer.

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

Members

Variables

isNested
enum bool isNested;
Undocumented in source.

Parameters

T

$(D_KEYWORD class), $(D_KEYWORD struct) or $(D_KEYWORD union) type.

Return Value

$(D_KEYWORD true) if the argument is a nested type which internally stores a context pointer, $(D_KEYWORD false) otherwise.

Examples

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

class C
{
    void method()
    {
    }
}
static assert(isNested!C);

Meta