Static constructors guaranteed to run?

via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Jun 29 10:22:17 PDT 2015


On Monday, 29 June 2015 at 11:36:42 UTC, ketmar wrote:
> it doesn't, afair, but it's quite natural. if user type was 
> throwed out as unused, it would be very strange to insist on 
> keeping it's initialization code.

Yes, but I would instead expect that the static ctor prevents the 
type from becoming unused in the first place.


More information about the Digitalmars-d-learn mailing list