20 Nov
2014
20 Nov
'14
3:07 p.m.
On Thu, Nov 20, 2014 at 7:59 AM, Andrey Semashev
On Thu, Nov 20, 2014 at 5:54 PM, David Stone
wrote: Is it really such a problem to have this object in every translation unit? Is it beyond current linker technology to merge these identical copies, thus preventing binary bloat?
The linker must not merge them because these objects must have distinct addresses. This might not be the case for references though.
Only if you take their address. If no one is saying &boost::none or passing it by reference to a function that takes its address, no one can tell the difference.