Static constructors guaranteed to run?
Timon Gehr via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Jun 27 13:16:09 PDT 2015
On 06/27/2015 11:54 AM, "Marc =?UTF-8?B?U2Now7x0eiI=?=
<schuetzm at gmx.net>" wrote:
>
>
>> 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?
>
> Definitely not. Things inside a template don't even exist if that
> template is never instantiated.
(That wasn't his question.)
More information about the Digitalmars-d-learn
mailing list