D's type classes pattern ?

matovitch via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Mar 24 09:17:50 PDT 2015


well, alias this is the issue here.

interface I
{
     void foo();
}

struct S
{
     void foo() {}
}

class C : I
{
     S s;
     alias this s;
}

don't compile...if you have any idea to do otherwise I am greatly 
interested. Thanks !


More information about the Digitalmars-d-learn mailing list