www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - how can i mixin a function as struct or class member function

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
Apr 16 2022