Boost logo

Boost :

Subject: Re: [boost] [any] new version
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2011-09-01 04:43:37

On 01/09/2011 10:30, Mathias Gaunard wrote:
> On 01/09/2011 05:26, Andrey Semashev wrote:
>> In addition, on most platforms there will be multiple instances of
>> type_id<T>::value for a single given T if the application uses
>> type_id<T> in multiple modules.
> That's not a problem, type_id<T>::value is a weak symbol.
>> These instances will be initialized
>> independently and most likely will have different ids. And since
>> next_id() is also module-private, inter-module passing of boost::any
>> becomes totally impossible.
> You could make next_id a function with weak extern linkage, which should
> be able to make it work.

The attached testcase appears to work.
It doesn't, of course, if next_id is static.

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