Static constructors guaranteed to run?

ketmar via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Jun 27 15:20:40 PDT 2015


On Fri, 26 Jun 2015 22:00:51 +0000, Tofu Ninja wrote:

> Are static constructors guaranteed to run if the module is imported?
> Also are static constructors in templated types guaranteed to run for
> every instantiation? Even if the instantiation is never actually used
> outside of compile time code, like in an alias or in a UDA?

i believe that the answers are:

1. yes.
2. no.
-------------- 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/20150627/89c48b13/attachment.sig>


More information about the Digitalmars-d-learn mailing list