Map one tuple to another Tuple of different type

Vlad Levenfeld via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Jul 20 18:05:13 PDT 2014


Thats real weird that it would reject your "i" variable, given 
that T.length is known at compile time. I think this is a bug. I 
can get your code to compile if I change your foreach loop to 
this:

foreach(i, U; T)
    modTuple[i] = transTupleElem(argTuple[i]); // ok


More information about the Digitalmars-d-learn mailing list