From: Alexander Grund (alexander.grund_at_[hidden])
Date: 2021-02-02 14:13:00


>> It does not because the symbols to be exported are (supposed to be) only
>> defined in Boost.ProgramOptions library.
> BOOST_SYMBOL_VISIBLE is always default visibility, no matter what.
>
> Therefore anything in a Boost.ProgramOptions header would be made
> visible and thus exported, which equals exporting all the extern
> declarations. That, in turn, would cause ABI collision if somebody tries
> linking in a non-matching Boost, under the assumption that an internal
> Boost has been hidden from linkage (which "works", so far).

So how do you propose to setup a library such that exceptions can be
caught by consumers of that library in a portable way?

IMO the scenario you describe is impossible to support: Either
everything is hidden, then exceptions can't be caught/dynamic_cast not
used (according to docs on OSX) or it is VISIBLE, then you have
potential collisions.