template mixin function name mangling

Peter Alexander peter.alexander.au at gmail.com
Mon Apr 22 02:05:08 PDT 2013


On Monday, 22 April 2013 at 09:03:24 UTC, Peter Alexander wrote:
> mixin A();
> mixin B();
>
> void main() {
>     int x = A.foo() + B.foo();
> }

Oops, syntax fail. Should be something more like this:

mixin A a;
mixin B b;

void main() {
     int x = a.foo() + b.foo();
}


More information about the Digitalmars-d mailing list