
"vicente.botet" ha escrito:
Hi,
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; #else typedef static_holder_class<C> type; #endif }; };
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: http://lists.boost.org/Archives/boost/2008/01/132814.php Joaquín M López Muñoz Telefónica, Investigación y Desarrollo