question about ctfe init importC zero length array of struct
Dakota
dakota at gmail.com
Thu Feb 29 07:51:59 UTC 2024
This is the type defined from c code import by importC:
```c
struct A {
int count;
int[] i;
}
```
This kind data need to be init as const to avoid runtime cost,
and need to be done from D code.
how can I do this ?
To put code into D source, I can use "-i=package" to
automatically import the only need part without rebuild it, and
avoid the problem of importC path search. (and there is type
wrapper inside D code).
I can fix it with a template type, the cost is very slow build
time. (because there is a lot diff auto generate type)
Any suggestions how to handle this fast and simple ?
More information about the Digitalmars-d-learn
mailing list