RAII trouble

Spacen Jasset via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Nov 20 15:35:48 PST 2015


On Friday, 20 November 2015 at 23:21:03 UTC, anonymous wrote:

[...]
> FT_Init_FreeType must be read at compile time, because freeType 
> is a module level variable, and initializers for module 
> variables must be static values. The initializer is run through 
> CTFE (Compile Time Function Evaluation).
> Put the initialization/assignment in a function and it should 
> work. That function can be a static constructor or the main 
> function:
> ----
[...]


Yes, I see. I made a mistake. I need to initialize it elsewhere. 
It was quite confusing.

Thanks.


More information about the Digitalmars-d-learn mailing list