Subject: Re: [boost] questions regarding visibility and b2
From: Raffi Enficiaud (raffi.enficiaud_at_[hidden])
Date: 2018-10-30 21:56:30


On 27.10.18 19:29, Robert Ramey via Boost wrote:
> I've got a few questions about the "visibility" changes for boost.
>
> My understanding is that "visibility" for gcc and clang are "sort of the
> same thing" as dll import and export are for windows.
>

I also thought the same, but there are differences.
You may read more about this here:

https://github.com/boostorg/boost/pull/190#issuecomment-423766391

In particular for boost.test, I ended up with 2 singletons (funny) as
the implementation of the singleton was visible to the client code:

https://github.com/boostorg/test/blob/4df5b095eaa967f5e2687978bd3d9467b758f28e/include/boost/test/utils/trivial_singleton.hpp#L37

This alone was enough to instanciate a singleton in the client code in
addition to the one in the boost.test code.

Hope this helps,
Raffi