Boost logo

Boost :

Subject: Re: [boost] Making Boost invisible
From: Edward Diener (eldiener_at_[hidden])
Date: 2018-09-25 17:38:03


On 9/25/2018 1:08 PM, John Maddock via Boost wrote:
> Folks I have a bug report against Boost.Config that I don't know what
> (if anything) I should do about:
> https://github.com/boostorg/config/issues/243
>
> The issue is this: lets say I build boost as static libraries with
> -fvisibilty=hidden because I want my application or shared library to
> *hide all boost symbols*.  But there are some parts of boost which
> unconditionally make things visible - throw_exception is one particular
> culprit, but there are others, probably anything which uses
> BOOST_SYMBOL_VISIBLE in fact.
>
> Question: should we support this?  If so how?  The only thing I can
> think of is a user-defined macro which when set, disables symbol
> visibility.
>
> Thoughts?

Isn't it up to each built library to determine what symbols should be
visible or not in order to use that library ? In general public and
protected class functionality should be visible, and functions which are
part of the library's public interface are visible, with everything else
remaining hidden. If an end-user wants to override this for some
personal reason there should be a mechanism for doing so, but I would
normally see little reason why an end-user should want to do that. What
harm can it be to allow normally visible symbols to remain visible for
the end-user ?

>
> Thanks, John.


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