how can i mixin a function as struct or class member function

mycybyby ma.yc at 163.com
Sat Apr 16 10:48:41 UTC 2022


for example:

     function void a(int i) {
         writeln(i);
     }

     auto JSFunction(alias F)() if(isSomeFunction!F) {
         class S {
        	public ReturnType!F dg(ParameterTypeTuple!F) {
                 mixin(F.body) // what should i do ???
             }
         }
     }

thank you


More information about the Digitalmars-d-learn mailing list