Jonathan M Davis:

> I'm pretty sure not. I think that it's currently suffering the same fate as 
> stuff 
> like classes and is not yet able to be CTFEed. Some day...

This works:

import std.stdio;

string foo(int x) {
    auto aa = [1: "hello", 2: "red"];
    return aa[x];
}

enum string s = foo(1);

void main() {
    writeln(s);
}


Bye,
bearophile

Reply via email to