|
Boost : |
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2021-02-02 15:49:52
On 2/2/21 6:12 PM, Niall Douglas via Boost wrote:
> On 02/02/2021 15:01, Peter Dimov via Boost wrote:
>> Niall Douglas wrote:
>>
>>> I seem to be having difficulty communicating this to anyone here, so
>>> here's a godbolt:
>>>
>>> https://godbolt.org/z/jv5Y75
>>
>> But you've provided a definition for thirdpartylib_nothidden. This is
>> not the case under discussion. The case under discussion is making
>> BOOST_SYMBOL_IMPORT imply _VISIBLE, which translates to a default
>> visibility attribute on the _declaration_ of thirdpartylib_nothidden.
>
> If the Boost library where BOOST_XXX_DECL = BOOST_SYMBOL_VISIBLE is
> being applied has public headers which never, ever provide an
> implementation for any function, then BOOST_XXX_DECL =
> BOOST_SYMBOL_VISIBLE would not cause export of third party symbols in
> consuming libraries.
>
> I would be surprised if any such C++ library, let alone Boost library,
> exists, however.
The practice of having a declaration marked with BOOST_*_DECL in a
header and a definition, also marked with BOOST_*_DECL, in a separate
.cpp file is ubiquitous for any separately compiled Boost library.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk