Static constructors guaranteed to run?

ketmar via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Jun 28 19:10:24 PDT 2015


On Sat, 27 Jun 2015 22:49:13 +0000, Tofu Ninja wrote:

> On Saturday, 27 June 2015 at 22:20:40 UTC, ketmar wrote:
>> 2. no.
> 
> Hmm...  any reason why?

p.s. note that static ctors are *intended* to run in runtime, not in 
compile time. if compiler decides that some code is not required in 
runtime, it is free to remove all that code, including static ctors.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20150629/75aa6566/attachment.sig>


More information about the Digitalmars-d-learn mailing list