Re: Tuple fields/types

2016-06-30 Thread Meta via Digitalmars-d-learn
On Thursday, 30 June 2016 at 21:53:42 UTC, Jordan Wilson wrote: Hello, For tuples, does the fieldNames property have a 1-1 correspondence with the Types property? It appears that way in my testing: alias MyData = Tuple!(string,"a",int,"b"); foreach (i, type; MyData.Types){ writeln (MyDat

Re: Tuple fields/types

2016-06-30 Thread Nicholas Wilson via Digitalmars-d-learn
On Thursday, 30 June 2016 at 21:53:42 UTC, Jordan Wilson wrote: Hello, For tuples, does the fieldNames property have a 1-1 correspondence with the Types property? It appears that way in my testing: alias MyData = Tuple!(string,"a",int,"b"); foreach (i, type; MyData.Types){ writeln (MyDat

Tuple fields/types

2016-06-30 Thread Jordan Wilson via Digitalmars-d-learn
Hello, For tuples, does the fieldNames property have a 1-1 correspondence with the Types property? It appears that way in my testing: alias MyData = Tuple!(string,"a",int,"b"); foreach (i, type; MyData.Types){ writeln (MyData.fieldNames[i]," ",type.stringof); // a string // b int