Subject: Re: [boost] [any] new version
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2011-09-02 02:28:06
On 09/02/2011 10:03 AM, Roman Perepelitsa wrote:
> 2011/9/2 Andrey Semashev<andrey.semashev_at_[hidden]>
>> It does, if you make RTTI public for relocation.
> The existing implementation of any works unless you make RTTI local to
> dynamic libraries. The new and faster implementation of any works unless you
> make type_id local to dynamic libraries. In both cases it's a matter of
> specifying the export maps correctly.
Well, it's not the same, actually. If you actually do limit export
tables in your application, you can export all RTTI by a wildcard rule
in the symbols map. I would expect you to do this regardless whether you
use boost::any or not, just to keep basic C++ features working. Note
that you can even do export RTTI with a single GCC option
-fvisibility-ms-compat, no symbol maps required in this case.
Now if boost::any requires its own symbols exported, that is additional
work to know which these symbols are and explicitly exporting them,
possibly by modifying Boost code to alter their visibility. This cannot
be done by a compiler option and it won't match the common wildcard
rules for RTTI in your symbols map.
Lastly, these problems only exist on Linux. On other platforms you don't
have to do _anything_ to make RTTI working. That is unlike ids.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk