|
Boost : |
From: Fernando Cacciola (fcacciola_at_[hidden])
Date: 2002-03-07 15:49:02
----- Original Message -----
From: "Peter Dimov" <pdimov_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Thursday, March 07, 2002 3:31 PM
Subject: Re: [boost] bind placeholders/tuples ignore and BCB pch
> From: "Fernando Cacciola" <fcacciola_at_[hidden]>
> > > Does it work in your case?
> > >
> > Almost...
> >
> > This allows me to include the 'library' in a pch, but since it doesn't
> allow
> > me to include the placeholders in a pch, it prevents inline fucntions
> which
> > would use bind to be in a pch too.
> > For me this is a real problem. The most useful thing about bind is that
it
> > helps writting inline code, which high-level users typically put in
> > precompiled headers.
>
> 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.
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