[Issue 13421] disallow __gshared members without static

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Sep 4 11:37:02 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=13421

--- Comment #5 from Marc Schütz <schuetzm at gmx.net> ---
`static __gshared` is currently indeed redundant, but my point is that this
isn't obvious. I would expect it to work analogously to a shared member: You
can have static and non-static ones of those. As I see it, __gshared merely
means "make it shared, but don't complain about unsynchronized access".

Therefore I can't agree that it implies "one instance". It's IMO better to make
it explicit.

--


More information about the Digitalmars-d-bugs mailing list