bearophile wrote:
> Jonathan M Davis:
> 
>> At present, I don't believe that associative arrays are valid CTFE
> 
> You are wrong, the current situation with AAs is not so simple :-)
> 
> 
> string foo(string k) {
>     string[string] map = ["bar" : "spam"];
>     return map[k];
> }
> enum string v = foo("bar");
> static assert(v == "spam");
> void main() {}
> 
        He is right. Your example uses a non-static local variables which
he stated does not need to be CTFE-able.

                Jerome
-- 
mailto:jeber...@free.fr
http://jeberger.free.fr
Jabber: jeber...@jabber.fr

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to