On 07/14/2013 11:37 AM, lomereiter wrote:
I assume that you template ends up creating a dummy interface though
and this isn't really acceptable.

Yes, it does. Once ':' is typed, some inheritance must occur.


Nope.

template Seq(T...){ alias T Seq; }

class C : Seq!(){ }


Why isn't a dummy interface acceptable?

It creates unnecessary bloat.

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

Reply via email to