xxxxxxxxxx
import std;
interface IX
{
//
}
mixin template X()
{
//
}
// Mixin templates to class.
// Scan class interfaces, then mix
mixin template Members()
{
alias T = typeof( this );
static
foreach ( IFACE; InterfacesTuple! T )
{
pragma( msg, IFACE );
pragma( msg, IFACE.stringof[ 1 .. $ ] );
static
if ( IFACE.stringof.length > 1 && IFACE.stringof[ 1 .. $ ] )
{
mixin ( IFACE.stringof[ 1 .. $ ] )!(); // <-- HERE TROUBLE
}
}
}
class A : IX
{
mixin Members!();
}
void main()
{
auto a = new A();
}