hasAliasThis

Returns true if Child has an alias this of type Parent, and as such is implicitly convertable.

enum hasAliasThis (
Child
Parent
)

Parameters

Child

The base class to test.

Parent

The parent class to test.

Return Value

Whether Child has an alias this of Parent.

Examples

struct A { }
struct B
{
    A a;
    alias a this;
}
struct C { }

assert( hasAliasThis!( B, A ) );
assert( !hasAliasThis!( C, A ) );
assert( !hasAliasThis!( A, C ) );
assert( !hasAliasThis!( float, bool ) );

Meta