[Issue 7083] variables with static/private storage create global symbols
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Mar 3 15:43:53 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=7083
kinke <kinke at gmx.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kinke at gmx.net
--- Comment #4 from kinke <kinke at gmx.net> ---
(In reply to Martin Nowak from comment #2)
> > as the code/data for one module can be distributed among several object files
>
> Do you mean the multilib support?
```
private __gshared int something;
int getSomething(T)() { …; return something; }
```
If the (public) template is instantiated and emitted into another object file /
binary, it still needs to be able to access the private symbol.
--
More information about the Digitalmars-d-bugs
mailing list