]>
Commit | Line | Data |
---|---|---|
5fee5ec3 IB |
1 | // https://issues.dlang.org/show_bug.cgi?id=17143 |
2 | ||
3 | struct Tuple(T...) | |
4 | { | |
5 | T values; | |
6 | alias expand = values; | |
7 | } | |
8 | ||
9 | Tuple!T tuple(T...)(T args) | |
10 | { | |
11 | return Tuple!T(args); | |
12 | } | |
13 | ||
b4c522fa | 14 | enum foo = tuple(1, 2).expand; |
7da827c9 IB |
15 | static assert(typeof(foo).stringof == "(int, int)"); |
16 | static assert(foo.stringof == "tuple(1, 2)"); |