Boost logo

Boost :

Subject: Re: [boost] [any] new version
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2011-09-06 07:34:33

On 05/09/2011 19:00, Andrey Semashev wrote:
> On 09/05/2011 03:40 PM, Mathias Gaunard wrote:
>> On 01/09/2011 19:00, Andrey Semashev wrote:
>>> Suppose you use boost::any with types int and string in your main
>>> executable and in one of the dlls linked in. Exe and dll will have
>>> separate instances of both type_id<int>::value and
>>> type_id<string>::value
>> Which is no different than when compiling multiple translation units.
> You are assuming runtime linking, again.

Hm no, I was drawing a parallel with static linking here.
When you use DLL, so, or dylib, you use runtime linking which, ideally,
should be essentially the same.

> Are you saying that, say, on MacOS X or Solaris there is no need to do
> anything to export these symbols and the runtime linker will relocate
> them to a single instance? That's news to me.

Whether you have to export the symbols or not is a separate issue.
The linkers above support symbols that are "weak", while DLL do not

Boost list run by bdawes at, gregod at, cpdaniel at, john at