|
Boost-Build : |
Subject: [Boost-build] Boost serialization API changes
From: Ven Tadipatri (ven.tadipatri_at_[hidden])
Date: 2011-01-15 13:15:00
We upgraded from Boost 1.38 to Boost 1.45, and our serialization code
does not appear to work with the new API, specifically the
BOOST_CLASS_EXPORT.
The specific class used is called ByteDataObjectA, and the issue has to
do with virtual inheritance, since the compile errors go away if this
code is placed in the header: (however it still fails at runtime with a
"pure virtual function" called error
namespace boost{
template<>
struct is_virtual_base_of<ns:ParentClass,
testing::dataobjects::ByteDataObjectA>: public mpl::true_ {};
}
namespace boost{
template<>
struct is_virtual_base_of<ns:GrandParentClass,
testing::dataobjects::ByteDataObjectA>: public mpl::true_ {};
}
Does anyone have any idea what's going on? Here is how the
BOOST_CLASS_EXPORT(ByteDataObjectA) macro is resolved in the two
versions of boost.
Thanks,
Ven
//boost 1.45
namespace boost {
namespace serialization {
template<>
struct guid_defined< ByteDataObjectA > : boost::mpl::true_ {}; \
template<>
inline const char * guid< ByteDataObjectA >(){
return "ByteDataObjectA";
}
} /* serialization */
}
namespace boost {
namespace archive {
namespace detail {
namespace extra_detail {
template<>
struct init_guid< ByteDataObjectA > {
static guid_initializer< ByteDataObjectA > const & g;
};
guid_initializer< ByteDataObjectA > const & init_guid<
ByteDataObjectA >::g =
::boost::serialization::singleton<
guid_initializer< ByteDataObjectA >
>::get_mutable_instance().export_guid();
}}}}
//boost 1.38.0
namespace boost {
namespace archive {
namespace detail {
template<>
struct init_guid< ByteDataObjectA > {
static ::boost::archive::detail::guid_initializer<
ByteDataObjectA > const
& guid_initializer;
};
}}}
::boost::archive::detail::guid_initializer< ByteDataObjectA > const &
::boost::archive::detail::init_guid< ByteDataObjectA
>::guid_initializer =
::boost::serialization::singleton<
::boost::archive::detail::guid_initializer<
ByteDataObjectA >
>::get_mutable_instance().export_guid("ByteDataObjectA");
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk