Boost logo

Boost Users :

From: Damien * (damdai_at_[hidden])
Date: 2005-04-03 15:37:01


>Damien * wrote:
> > has anyone seen this compile error before, and know how to fix it?
> >
> > /usr/local/include/boost-1_32/boost/archive/detail/iserializer.hpp:428:
> > no type named `type' in `struct
>boost::mpl::eval_if<boost::is_abstract<MyClass>,
> >
>boost::mpl::identity<boost::archive::detail::load_pointer_type<boost::archive::text_iarchive,
> > MyClass*>::abstract<MyClass> >,
> >
>boost::mpl::identity<boost::archive::detail::load_pointer_type<boost::archive::text_iarchive,
> > MyClass*>::non_abstract<MyClass> > >'
> >
> > im trying to serialize a polymorphic class that has a pointer to
> > another class of the same type in it. if i comment out that line in
> > the serialization function, the error goes away.

>is MyClass abstract? That is, does it have a pure abstract function in it
>( func() = 0;)? Check BOOST_IS_ABSTRACT in the documentation.
>
>Robert Ramey

MyClass is not abstract. it has virtual functions, but no pure virtual
functions. if i use that macro however, the error goes away, but i then get
this runtime assertion failure when it tries to serialize out.

/usr/local/include/boost-1_32/boost/archive/detail/oserializer.hpp:432:
static void boost::archive::detail::save_pointer_type<Archive,
TPtr>::polymorphic<T>::save(Archive&, const T&, const
boost::archive::detail::basic_pointer_oserializer*) [with T = MyClass,
Archive = boost::archive::binary_oarchive, TPtr = MyClass*]: Assertion
`__null != bpos_ptr' failed.


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