Boost logo

Boost :

Subject: Re: [boost] [config] Request for BOOST_SYMBOL_IMPORT_VISIBLE ?
From: John Maddock (boost.regex_at_[hidden])
Date: 2011-02-07 05:26:34


>>> So, I propose to have 2 new macroses:
>>> BOOST_SYMBOL_VISIBLE_EXPORT//export "always" visible symbol from the
>>> library
>>> BOOST_SYMBOL_VISIBLE_IMPORT//import "always" visible symbol to the
>>> library
>>
>> Mostafa
>
> Though I suggest the names:
>
> BOOST_SYMBOL_EXCEPTION_EXPORT
> BOOST_SYMBOL_EXCEPTION_IMPORT
>
> to emphasize that this macros should be only used with exceptions. Having
> BOOST_SYMBOL_EXPORT and BOOST_SYMBOL_VISIBLE_EXPORT is kind of confusing,
> whereas the names BOOST_SYMBOL_EXPORT and BOOST_SYMBOL_EXCEPTION_EXPORT
> are self-explanatory, I don't need the look up reference manual to figure
> out what they do when I'm scanning code.
>
> Any thoughts?

Is this really just limited to exception classes? I got the impression from
the GCC docs that the issue might extend to:

* Classes with vtables that are used in dynamic_cast's or with typeid.
* Classes with static data members.

I still think that re-exporting "just enough and no more" is error prone,
and we should just follow the gcc guidelines and re-export everything that's
imported - I rather got the impression that gcc will only actually generate
re-export data for vtables anyway?

John.


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