tupleof function parameters?

Jon Degenhardt jond at noreply.com
Tue Aug 28 06:59:02 UTC 2018


On Tuesday, 28 August 2018 at 06:20:37 UTC, Sebastiaan Koppe 
wrote:
> On Tuesday, 28 August 2018 at 06:11:35 UTC, Jon Degenhardt 
> wrote:
>> The goal is to write the argument list once and use it to 
>> create both the function and the Tuple alias. That way I could 
>> create a large number of these function / arglist tuple pairs 
>> with less brittleness.
>>
>> --Jon
>
> I would probably use a combination of std.traits.Parameters and 
> std.traits.ParameterIdentifierTuple.
>
> Parameters returns a tuple of types and 
> ParameterIdentifierTuple returns a tuple of strings. Maybe 
> you'll need to implement a staticZip to interleave both tuples 
> to get the result you want. (although I remember seeing one 
> somewhere).

Alex, Sebastiaan - Thanks much, this looks like it should get me 
what I'm looking for. --Jon


More information about the Digitalmars-d-learn mailing list