Boost logo

Boost :

Subject: Re: [boost] [any] new version
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2011-09-05 13:00:54

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.

>> In practice, I'm aware of only one platform (Linux), which will by
>> default attempt to maintain a single instance of these ids, but even
>> there care must be taken.
> Quite the opposite, only DLLs don't support weak symbols.

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.

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