staticMap but with two arguments

John Chapman john.chapman at live.com
Thu Feb 9 20:45:21 UTC 2023


On Thursday, 9 February 2023 at 19:17:55 UTC, Ali Çehreli wrote:
> I could not figure out eliminating the hard-coded 4. Can we 
> introspect the parameter list of a template like 'fun' in the 
> example? If we could, then we could get 4 that way.

Thank you for this. I don't mind hard-coding the N argument. 
TemplateArgsOf needs an instantiated template but maybe ```enum N 
= count(fun.stringof, ',') + 1``` is good enough.


More information about the Digitalmars-d-learn mailing list