How to evaluate a JSON file at compile time and create a struct out of it?

Ferhat Kurtulmuş aferust at gmail.com
Fri Oct 4 10:47:04 UTC 2024


On Friday, 4 October 2024 at 10:33:37 UTC, Ferhat Kurtulmuş wrote:
> On Friday, 4 October 2024 at 08:45:49 UTC, holyzantaclara wrote:
>> [...]
>
> Your issue is related to static that seems it does not trigger 
> a compile time evaluation.


According to the docs, static does not imply immutability at al. 
For your case, you can also use enum.

https://dlang.org/spec/attribute.html#static


More information about the Digitalmars-d-learn mailing list