BaseTypeTuple

Returns a tuple of base classes and interfaces of T.

$(D_PSYMBOL BaseTypeTuple) returns only classes and interfaces T directly inherits from, but not the base classes and interfaces of its parents.

template BaseTypeTuple (
T
) if (
is(T == class) ||
(is(T == interface))
) {}

Members

Aliases

BaseTypeTuple
alias BaseTypeTuple = Tuple
Undocumented in source.

Parameters

T

Class or interface type.

Return Value

A tuple of base classes or interfaces of ($D_PARAM T).

Examples

interface I1
{
}
interface I2
{
}
interface I3 : I1, I2
{
}
interface I4
{
}
class A : I3, I4
{
}
static assert(is(BaseTypeTuple!A == AliasSeq!(Object, I3, I4)));
static assert(BaseTypeTuple!Object.length == 0);

See Also

$(D_PSYMBOL TransitiveBaseTypeTuple).

Meta