Static fields with shared fields

Marcel marcelpi97 at gmail.com
Mon Jan 27 22:39:06 UTC 2020


Hello!
If I declare a static variable inside a struct that contains a 
shared field, is that new variable also shared? For example, say 
I have a custom atomic wrapper type, like C++'s std::atomic<T>, 
that contains only one shared variable: Does it remain shared 
when I instantiate one or do I have to rely on shared again (or 
__gshared)?


More information about the Digitalmars-d-learn mailing list