Re: Compile time initialization of AA

2018-03-24 Thread Xavier Bigand via Digitalmars-d-learn
Le 23/03/2018 à 23:43, Xavier Bigand a écrit : I am trying to initialize an global immutable associative array of structs, but it doesn't compile. I am getting the following error message : "Error: not an associative array initializer". As I really need to store my data for a compile time purp

Re: Compile time initialization of AA

2018-03-24 Thread Patrick Schluter via Digitalmars-d-learn
On Friday, 23 March 2018 at 22:43:47 UTC, Xavier Bigand wrote: I am trying to initialize an global immutable associative array of structs, but it doesn't compile. I am getting the following error message : "Error: not an associative array initializer". As I really need to store my data for a c

Re: Compile time initialization of AA

2018-03-23 Thread Seb via Digitalmars-d-learn
On Friday, 23 March 2018 at 22:43:47 UTC, Xavier Bigand wrote: I am trying to initialize an global immutable associative array of structs, but it doesn't compile. I am getting the following error message : "Error: not an associative array initializer". As I really need to store my data for a c

Re: Compile time initialization of AA

2018-03-23 Thread Ali Çehreli via Digitalmars-d-learn
On 03/23/2018 03:43 PM, Xavier Bigand wrote: > I am trying to initialize an global immutable associative array of > structs, but it doesn't compile. Current solution is to initialize the AA in a 'static this()' block or ('shared static this()'). > I am getting the following error message : "Er

Compile time initialization of AA

2018-03-23 Thread Xavier Bigand via Digitalmars-d-learn
I am trying to initialize an global immutable associative array of structs, but it doesn't compile. I am getting the following error message : "Error: not an associative array initializer". As I really need to store my data for a compile time purpose if we can't do that with AA, I'll use array