Generic structural recursion

John Colvin john.loughran.colvin at gmail.com
Wed Jan 26 18:41:50 UTC 2022


On Wednesday, 26 January 2022 at 18:22:18 UTC, H. S. Teoh wrote:
> [...]

You could define a template that introspects a struct type and 
gives you a tuple of getters (each taking a struct and returning 
one of the doubles), then your functions that do real work would 
just loop over those getters. I suspect using the new(-ish) alias 
assign feature would help in defining that template.


More information about the Digitalmars-d mailing list