__gshared as part of alias

kinke noone at nowhere.com
Wed Jan 17 22:56:09 UTC 2018


On Wednesday, 17 January 2018 at 22:01:57 UTC, Johan Engelen 
wrote:
> ```
> struct GSharedVariable(AddrSpace as, T)
> {
>     static __gshared T val;
>     alias val this;
> }
> alias Global(T)   = GSharedVariable!(AddrSpace.Global,   T);
>
> Global!float bar1; // __gshared
> ```

Only 1 value per T though. ;)


More information about the Digitalmars-d-learn mailing list