Boost logo

Boost :

Subject: Re: [boost] bug-sprint #2114, 2 comments
From: Alexander Arhipenko (arhipjan_at_[hidden])
Date: 2009-06-11 02:58:24

Hi Juergen,

On Wed, Jun 10, 2009 at 3:15 PM, Juergen Hunold<juergen.hunold_at_[hidden]> wrote:
>> But, all these could be not enough for the sophisticated user.
>> Assume, library 'bar' will use library 'foo' as an implementation detail
>> and also will catch all the foo's exceptions. So, bar's maintainer doesn't
>> want to re-export foo's stuff from his library.
> This is the gcc case, right ? With msvc, you have to "re-export" the used
> symbols anyway (by marking them "__dllimport". So why do you want to hide the
> symbols with gcc ?

I guess, I was not clear and typed too many words ;).
Consider the following:

foo: [foo::function, foo::Error]
bar: [bar::function,]

('[]' - means list of exported symbols)

In case, when 'bar' depends on 'foo' and foo::Error is not re-exported:
bar: [bar::function].
So, bar only exports bar::function symbol.
This is the same for gcc and msvc
(I've rechecked msvc's case with dumpbin utility).

In case, when foo::Error is re-exported
(i.e., foo:Error always have 'default' visibility):
bar: [bar::function, foo::Error].
This only relates to gcc.

>So why do you want to hide the
> symbols with gcc ?
The reason could be binary compatibility.


Boost list run by bdawes at, gregod at, cpdaniel at, john at