Strange Mixin issue
Frustrated
Frustrated at nowhere.com
Wed Mar 5 13:30:41 PST 2014
I am trying to remove the unnecessary passing of the type of
class to a template but can't seem to get it to work:
see
The code is the
mixin(AbstractToInterface!(WindowsGui, iButton, WindowsButton,
iBorder, WindowsBorder));
which I want to not have to specify WindowsGui.
I've tried wrapping AbstractToInterface in a mixin template and
use that and typeof(this) but then the mixin of the mixin does
not get mixed in to the class
e.g.,
mixin template AbstractToInterface2(T...)
{
mixin(AbstractToInterface!(typeof(this), T));
}
Then use mixin AbstractTointerface2!(iButton, WindowsButton,
iBorder, WindowsBorder).
It's probably something stupid but I can't seem to get it to
work(have a very similar case in some other code and it works
fine... the only difference is I'm not using nested mixins.
More information about the Digitalmars-d-learn
mailing list