Boost logo

Boost :

From: Fernando Cacciola (fcacciola_at_[hidden])
Date: 2002-03-07 16:23:32


----- Original Message -----
From: "Peter Dimov" <pdimov_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Thursday, March 07, 2002 5:56 PM
Subject: Re: [boost] bind placeholders/tuples ignore and BCB pch

> From: "Fernando Cacciola" <fcacciola_at_[hidden]>
> > From: "Peter Dimov" <pdimov_at_[hidden]>
> > > Yes, I see. But why do you need to export the placeholders from a DLL?
> > >
> > Good question!
> >
> > I currently develop/mantain of set of DLLs (about 30), most of them
being
> > used by several Delphi EXEs.
> > There is ONE 'core-like' DLL which is always used by all other DLLs (a
> sort
> > of in-house RTL).
> > Everything that is really general and globally used, such as boost
global
> > objects -i.e. the extern bind placeholders- is located in this core DLL,
> so
> > that it is avilable to any piece of code linked to it.
> >
> > Another option is to place the definitions of the placeholdes in each
DLL
> > that happened to used bind, something that in my configuration is
> wastefull,
> > since nearly all them use it, and all of them are linked to the core
DLL.
> > Of course, I could do that -it is just another 29 additional translation
> > units -one per DLL- :-)
> > but why would I? It is easier to mark them as exported so they CAN be
> > placed in a unique shared library if needed. If they are used in a
single
> > EXE, or within a DLL, the 'extra' BOOST_DECL doesn't hurt, AFAICT.
>
> You can put the placeholders into the import library for the DLL... if you
> know how to do that, I don't. :-) (But it's possible.)

Well... Here's how: using BOOST_DECL :-))

(serioulsy, does it really matter if it is exported by hand or by
declaration?)

> Or in a separate
> static library.
>
But then I should link each and every DLL to that static library.... I don't
see why would I want to do that.

> Exporting _1 from a DLL looks wierd. :-)
>
Not to me...
At least not any more wierd than having _1 visible within a whole DLL.

Exporting is just a mean to *extend* the visibility of an identifier which
is already visible to a given extent.
Why would something *really general*, like _1, would look OK being visible
within a given DLL -which may contains hundred of source files-; but weird
just because it is also visible outside the DLL?

Anyway, it might look weird to other people, perhaps, but the choices are:

1) export it once and for all using BOOST_DECL
2) resort to any of the other options which are undoubtly more complicated.

I don't know a reason not to prefer 1), after all, we are talking about a
very general thing, not a particular domain specific library feature.

Other than being weird, do you see any problem with extending _1 visibility?

Fernando Cacciola
Sierra s.r.l.
fcacciola_at_[hidden]
www.gosierra.com


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