View difference between Paste ID: BxzHYKVs and TQFGLwuC
SHOW: | | - or go back to the newest paste.
1
template Tuple (E...)
2
{
3
    alias Tuple = E;
4
}
5
6
void main ()
7
{
8
    // Would be a string tuple.
9
    alias SomeTuple = Tuple!();
10
    int[string] map = [];
11
12-
    // Does not work. `i` is not known at compile time. Intentional.
12+
    auto a = map[SomeTuple[0]];
13-
    // `foreach (int i, string e; SomeTuple)` would make it work.
13+