How can you call a stored function in an AA with proper number of arguments converted to the proper type?

Kagamin via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jul 12 01:34:03 PDT 2016


Store a wrapper instead of the actual function:
void wrapper(alias F)(string[] args)
{
   (convert args to F arguments) and invoke
}

cmd.func = &wrapper!someFunc;

string[] args;
cmd.func(args);


More information about the Digitalmars-d-learn mailing list