From: Joaquín Mª López Muñoz (joaquin_at_[hidden])
Date: 2008-02-01 09:32:26
"vicente.botet" ha escrito:
> I was wondering if as the intermodule_holder is a kind of workaround for
> platforms where dynamic loaded libraries can duplicate static libraries, we
> can have a better performance on the others for free.
> On platforms on which static variables are unique inter dynamic loaded
> modules the intermodule_holder specifier can be a static_holder.
> This could be controlled using conditional compilation.
> struct intermodule_holder:holder_marker
> template<typename C>
> struct apply
> #ifdef BOOST_NO_DLL_UNIQUE_STATIC_VARIABLE
> typedef intermodule_holder_class<C> type;
> typedef static_holder_class<C> type;
> Have this a sens or I'm missing something?
> Could the documentation add a reference to the duplication problem?
This makes sense, but I lack expertise on this area, and don't really
know which platforms or compilers avoid symbol duplication.
If someone can help here I'll be happy to add this optimization.
> In addition, I'd replace static_holder by intramodule_holder.
> intramodule_holder reflects much more the accessibility intent for the
> users, static_holder talks more about the implementation.
Do you mean that intermodule_holder should be the default rather
than static_holder? There are reasons not to do that, as I explained
to John Reid at:
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk