is my code to get CTFE instantiated object valid D ?

chmike via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat May 28 04:13:26 PDT 2016


On Saturday, 28 May 2016 at 08:47:48 UTC, Kagamin wrote:
> For a trick of static mutable allocation see 
> https://github.com/dlang/druntime/pull/1325

Thank you that looks promising. I'll study an experiment with the 
code.
If I would like that the instances are not in TLS, can I use the 
following ?

private __gshared void[...] store;

I then need to be sure that the objects are instantiated at 
compile time.
Will Emplace do the trick ?




More information about the Digitalmars-d-learn mailing list