On Wednesday, 17 January 2018 at 22:56:09 UTC, kinke wrote:
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. ;)
Ah, haha indeed, I meant without the "static", but __gshared is
always "static".
```
alias Global(T) = shared Variable!(AddrSpace.Global, T);
```
seems to work.
https://godbolt.org/g/iDbRX7
-Johan