Hi,

It's been a long time since I coded some d code... sorry I take
the lazy way asking for advices. :D

Lets say I want to implement some generic algorithm. I would like
to checks the types passed to my algorithm implements a specific
interface.

interface IStuff(Stuff)
{
     void foo();
}

class TypeClass(T, I) : I(T)
{
     alias this T;
}

void myAwesomeAlgo(Stuff) (TypeClass!(Stuff, IStuff) stuff)
{
     stuff.foo();
}


Well it seems that I have worked out my question in trying to
formulate it...Would something like this work ?

Reply via email to