Will the loop (foreach) run at compile time? How can I make it work at compile time?

```
import std.csv, std.stdio;

alias Record = Tuple!(string, string, string);

immutable string[][] table;

shared static this() {
    string csvText = import("file.csv");
    foreach (record; csvReader!Record(csvText)) {
        table ~= [record[0], record[1], record[2]];
    }
}

void main() {
    writeln(table):
}
```

Reply via email to