On Sunday, 15 March 2015 at 01:20:55 UTC, Timothee Cour wrote:
Why can't we allow mixin templates to contain statements, as is
the case
for regular mixins?
Is there a workaround?
here's a dummy example:
template mixin Foo{
//some statement, eg: 'return;'
}
void fun(){
mixin Foo;
}
Note that I can do this with a regular mixin, but template
mixins are
cleaner (esp in more complex examples).
Wouldn't the most basic explanation be that templates cannot
contain statements, therefore mixin templates can't either?