
Nelson, Erik - 2 wrote:
Robert Ramey wrote:
I would look into something like:
#include
my_type x;
if(boost::serialization::implementation_level
, boost::serialization::level_type::not_serializable){ ... } or some variation of there of such as:
#include
namespace boost { namespace serialization {
template<class T> struct is_serializable { typedef typename boost::mpl::greater_than< boost::serialization::implementation_level
, boost::serialization::level_type::not_serializable >::type type; }; I played around with that a little, but it looks like for that to work I'd need to do something like
BOOST_CLASS_IMPLEMENTATION(my_class, boost::serialization::not_serializable)
for each type that was not serializable... am I missing something? In my experiment it seems like
boost::serialization::implementation_level<A>::type::value
resolves to object_class_info unless I use the BOOST_CLASS_IMPLEMENTATION. That's akin to manually marking the types, which I'd like to avoid if possible.
OK - looks like you've got me there. I was hoping that there was a cheap trick - but I guess not. Robert Ramey