betterC shared static ctor
    bauss 
    jj_1337 at live.dk
       
    Wed Jul 21 08:45:19 UTC 2021
    
    
  
On Wednesday, 21 July 2021 at 08:02:42 UTC, vit wrote:
> Is it possible to call all shared static ctors in betterC?
> ```d
> //-betterC
>
> static immutable int i;
>
> shared static this(){
> 	i = 42;
> }
> extern(C) void main(){
>     assert(i != 42);
>
> }
>
> ```
Static module constructors and destructors are not available with 
betterC unfortunately.
As described here:
https://dlang.org/spec/betterc.html#consequences
    
    
More information about the Digitalmars-d
mailing list