How can I test at compile time whether T is an instance of an interface ?

data pulverizer data.pulverizer at
Wed Sep 23 19:08:47 UTC 2020

On Wednesday, 23 September 2020 at 18:56:33 UTC, wjoe wrote:
> It doesn't occur to me that the compiler doesn't know at 
> compile time that
> interface IFoo{}
> class Foo: IFoo {}
> class Foo implements interface IFoo.

Didn't think that the compiler didn't know but wasn't aware that 
you could use that information to statically dispatch. My 
mistake, I'll shut up now!

More information about the Digitalmars-d-learn mailing list