Boost logo

Boost Users :

From: Robert Ramey (ramey_at_[hidden])
Date: 2005-09-11 23:42:34


Bruno Martínez wrote:
>> so one could say BOOST_CLASS_EXPORT_GUID(T, name_from_type<T>)
>
> I don't understand how BOOST_CLASS_EXPORT_GUID would work that way.
> There has to be a call to this macro for each type, and all calls
> have to be at global scope.
>

Actually I envisioned that the text "name_from_type..." would be passed into
the code and be invoked at each place - but maybe that was overly
optimistic. I would like to see name from type be orthogonal to export.hpp
which due to a number off issues (template instantitiation and linker
behavior and...) is pretty complex.

You might try to make something that looks like:

BOOST_TEMPLATE_EXPORT(template name)

But I haven't thought about it much after I considered it had a lot of
issues.

BTW - don't forget to consider namespaces of types and the fact that a
header module might be included in different header modules in different
namespaces. Or maybe not. I believe that this problem is not really
solvable in a definitive way at this time. But good luck.

Robert Ramey


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net