Boost logo

Boost :

Subject: Re: [boost] [any] new version
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2011-09-02 01:55:08


On 09/02/2011 01:24 AM, Roman Perepelitsa wrote:
> 2011/9/1 Martin Bidlingmaier<Martin.Bidlingmaier_at_[hidden]>
>
>> Ok, so obviously the proposed version won't work when instances of
>> boost::any cross dll borders.
>>
>
> The existing version of boost::any has the same limitation. If you make rtti
> info local to dynamic libraries, you won't be able to extra data from any in
> one dynamic library if it was put in in another.
>
> I personally don't consider this to be a limitation. If you want to be
> resilient to any kind of dynamic library barriers, you can't even use
> exceptions.

AFAIK, by default it does work out of the box on most (all?) platforms.
Yes, if you make RTTI private you get all sorts of problems but you have
to do it explicitly and if you do you are assumed to know what you're doing.

I think that this would be a significant limitation of boost::any. I
often use shared libraries and I consider it only natural that objects I
create are not tied to the module.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk