On Sunday, 14 July 2013 at 05:28:08 UTC, lomereiter wrote:
This should work:

template conditionallyInherit(bool inherit, T) {
    static if (inherit)
        alias T conditionallyInherit;
    else
        interface conditionallyInherit {}
}

Thanks, I tried something similar but it didn't work right...

I assume that you template ends up creating a dummy interface though and this isn't really acceptable.

e.g., interface A : conditionallyInherit!(false, B) { }

will cause A to inherit from conditionallyInherit?

Reply via email to