Maybe the problem isn't what I thought it was. I created a test case that works:

import std.stdio, std.cstream;

mixin template C()
{
        alias A = typeof(this);
        mixin(B!(A));
}

template B(T)
{
        pragma(msg, T);
enum B() { return "string foo() { return `<"~T.stringof~">`; }"; }
}

class A
{
        //mixin(B!(A));
        mixin C;
}


void main()
{
        auto a = new A;
        writeln(a.foo());
        //a.B();
        din.getc();
}


Note the difference in calls. C is much easier because you don't have to pass the parent type. This is all I'm trying to achieve in the other code but when I do the functions(foo in this case) do not get mixed in.

Reply via email to