why mixin template can not inclulde statement;

learnfirst1 learnfirst1 at gmail.com
Fri Aug 10 12:38:55 UTC 2018


mixin template test(A...){
         __gshared a = A;
         a++;
}

extern(C) void main(){
         mixin test!123;
}

-------------

I dont want to use string mixin to intro a lot un want symbol,  
try with mixin template find this not work.

I know if mixin test on global it should not working, but why not 
make the limit for function scope ?


I try use D for a WASM project then find so much limitation with 
no good reason.  or I missing some thing here ?




More information about the Digitalmars-d-learn mailing list