1 // 7851 2 3 TypeTuple(TList...)4template TypeTuple(TList...) 5 { 6 alias TList TypeTuple; 7 } 8 Tuple(Specs...)9struct Tuple(Specs...) 10 { 11 TypeTuple!(int, long, float) mem; 12 13 alias Identity!(mem[0]) _0; 14 alias Identity!(mem[1]) _1; 15 alias Identity!(mem[2]) _2; 16 17 alias mem this; 18 19 enum length = mem.length; 20 } 21 Identity(alias T)22private template Identity(alias T) 23 { 24 alias T Identity; 25 } 26 27 main()28void main() { 29 alias Tuple!(int, long, float) TL; 30 foreach (i; TL) 31 { } 32 } 33 34