isBasicType

Determines whether T is a basic type.

Basic types are scalar types and $(D_KEYWORD void).

enum bool isBasicType(T);

Return Value

$(D_KEYWORD true) if T is a basic type, $(D_KEYWORD false) otherwise.

Examples

static struct S
{
}
class C
{
}
enum E : int
{
    i = 0,
}

static assert(isBasicType!void);
static assert(isBasicType!(shared void));
static assert(isBasicType!E);
static assert(!isBasicType!(int*));
static assert(!isBasicType!(void function()));
static assert(!isBasicType!C);

See Also

$(D_PSYMBOL isScalarType).

Meta