Compile time initialization of AA
Xavier Bigand
flamaros.xavier at gmail.com
Fri Mar 23 22:43:47 UTC 2018
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 arrays instead.
Here is my code :
struct EntryPoint
{
string moduleName;
string functionName;
bool beforeForwarding = false;
}
immutable EntryPoint[string] entryPoints = [
"wglDescribePixelFormat": {moduleName:"opengl32.forward_initialization", functionName:"wglDescribePixelFormat"}
];
More information about the Digitalmars-d-learn
mailing list