Boost logo

Boost :

Subject: Re: [boost] [testing] Add a tester with hidden visibility
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2015-05-07 11:59:22


On Thursday 07 May 2015 16:45:22 Niall Douglas wrote:
> On 7 May 2015 at 7:54, Robert Ramey wrote:
> > So I had to update the source code to support the attributes for symbol
> > export on those functions which need to be exported. It sounds simple,
> > but getting this right in a way that supports both gcc and MSVC is tricky
> > and hard to get correct. I got the gcc to build and pass all test, but
> > now the MSVC is broken. Unfortunately, our testing system truncates the
> > error message so I can't see why the current branch in develop fails to
> > build. I'm still waiting from a response from the boost build team.
>
> I have no idea why you continue to insist on trying to second guess
> the very well established pattern here. The design of the GCC
> visibility support was chosen back in 2004 to correctly support all
> combinations of GCC, MSVC and Mingw without any special casing,
> trickery, or any macro work above the traditional preprocessor logic
> used for MSVC.

Well, it's not that simple. For example, if you dllexport a class template and
explicitly instantiate it in a dll with a non-exported type as a template
parameter, you will get what you want - an exported specialization. Hidden
visibility, OTOH, is viral, so the instantiated template will silently become
hidden in this case.

Other than that, yes, it's rather similar to MSVC.


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