How give a module to a CTFE function

Xavier Bigand flamaros.xavier at gmail.com
Mon Mar 12 21:00:07 UTC 2018


Hi,

I have a CTFE function that I want to make more generic by given it a 
module as parameter.


My actual code looks like :

mixin(implementFunctionsOf());


string implementFunctionsOf()
{
     import std.traits;

     string	res;

     foreach(name; __traits(allMembers, myHardCodedModule))
     {
     }
     return res;
}


I tried many things but I can't figure out the type of the parameter I 
should use for the function implementFunctionsOf.


More information about the Digitalmars-d-learn mailing list