InterfacesTuple

Returns all the interfaces T inherits from.

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

Members

Aliases

InterfacesTuple
alias InterfacesTuple = Filter!(isInterface, TransitiveBaseTypeTuple!T)
Undocumented in source.

Parameters

T

Class or interface type.

Return Value

Interfaces T inherits from.

Examples

interface I1
{
}
interface I2 : I1
{
}
class A : I2
{
}
class B : A, I1
{
}
class C : B, I2
{
}
static assert(is(InterfacesTuple!C == AliasSeq!(I2, I1)));

static assert(is(InterfacesTuple!Object == AliasSeq!()));
static assert(is(InterfacesTuple!I1 == AliasSeq!()));

Meta