how do I get the ith field of a std.typecons.Tuple ?

John Colvin john.loughran.colvin at gmail.com
Sun Aug 18 16:14:11 PDT 2013


On Sunday, 18 August 2013 at 20:54:14 UTC, Joseph Rushton 
Wakeling wrote:
> On Sunday, 18 August 2013 at 19:48:39 UTC, John Colvin wrote:
>> On Sunday, 18 August 2013 at 18:56:02 UTC, Dicebot wrote:
>>> Looking at Tuple implementation, this information gets lost 
>>> at template instatiation time. I think it is worth a pull 
>>> request to store properly ordered tuple of field aliases in 
>>> Tuple type.
>>
>> To get the names: 
>> https://github.com/D-Programming-Language/phobos/pull/1493
>
> Just checking, as I'm not too familiar with staticMap, but ... 
> is that something that will vanish nicely at runtime?  That is, 
> it won't add extra weight to the Tuple that must be passed 
> around?

Doesn't add any any runtime weight at all, it's just an alias.


More information about the Digitalmars-d-learn mailing list