isAbstractClass

Determines whether T is an abstract class.

Abstract class is a class marked as such or a class that has any abstract methods or doesn't implement all methods of abstract base classes.

enum bool isAbstractClass(T);

Return Value

$(D_KEYWORD true) if T is an abstract class, $(D_KEYWORD false) otherwise.

Examples

class A
{
}
abstract class B
{
}
class C
{
    abstract void func();
}
class D : C
{
}
class E : C
{
    override void func()
    {
    }
}
static assert(!isAbstractClass!A);
static assert(isAbstractClass!B);
static assert(isAbstractClass!C);
static assert(isAbstractClass!D);
static assert(!isAbstractClass!E);

See Also

$(D_PSYMBOL isAbstractFunction).

Meta