Generating members from parameter tuple

Brad Anderson eco at gnuk.net
Mon Aug 19 10:03:17 PDT 2013


On Monday, 19 August 2013 at 16:40:45 UTC, Dicebot wrote:
> On Monday, 19 August 2013 at 06:56:24 UTC, Brad Anderson wrote:
>> ...
>
> I remember asking Andrei on IRC about feature as "declaration 
> foreach" to exactly simplify such patterns. He kind of agreed 
> it may be useful and wanted to consult with Walter if it is 
> worth a DIP but seems like everyone including me has forgot it 
> :)
>
> In a meanwhile, here is a recursive template-based alternative:
>
> http://dpaste.dzfl.pl/f9def804

Ok, that helps me understand how to do it with recursion and 
mixin templates.  I ended up doing it like this: 
http://dpaste.dzfl.pl/14864b1b with help from Jakob Ovrum in IRC.


More information about the Digitalmars-d-learn mailing list