On Fri, 09 Sep 2005 15:43:58 -0300, Robert Ramey
if that's what you want to do - don't look too deeply into export.hpp.
The key macro is BOOST_CLASS_EXPORT_GUID(class, "name) and
BOOST_CLASS_EXPORT(T) is just
#define BOOST_CLASS_EXPORT(T) BOOST_CLASS_EXPORT_GUID(T, "T") // sort of
So the best would be for you to make something like:
template<class T> const char * name_from_type<T>()
You meant this, right?: template<class T> const char * name_from_type()/*<T>*/ { }
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.
What I have now is:
template<class T>
const char * name_from_type()
{
return typeid(T).name();
}
struct base {
template<class Archive>
void serialize(Archive&, unsigned) {
}
virtual ~base() {}
};
template<class T>
struct registor {
registor();
};
template<class T>
struct derived : base {
T t;
derived(T t) : t(t) {
boost::serialization::type_info_implementation