Boost logo

Boost Users :

From: Jeff Flinn (TriumphSprint2000_at_[hidden])
Date: 2004-09-20 06:53:17


"Jedediah Smith" <jedediah_at_[hidden]> wrote in message
news:opsej64te52tr4gs_at_pope...
>
> I'm trying to serialize a derived class through a shared_ptr<> to the base
> class. I'm getting an unregistered class exception even though my derived
> class is registered with register_type<>. It seems the exception is being
> thrown while trying to serialize boost::detail::sp_counted_base which I
> believe is part of shared_ptr. Could this be an internal error in the
> serialization library?

You'll need the macro BOOST_SHARED_POINTER_EXPORT which is defined at the
bottom of "boost/serialization/shared_ptr.hpp"

    class MyClass;

    boost::shared_ptr< MyClass > ptr;

    BOOST_SHARED_POINTER_EXPORT( MyClass );

Jeff F


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