|
Boost Users : |
Subject: Re: [Boost-users] [serialization] serialization of base pointer toderived class issue
From: Robert Ramey (ramey_at_[hidden])
Date: 2010-08-19 12:38:40
Look at the documentation regarding LoadConstruct and also
the tests for no default ctor.
Robert Ramey
Dante Stroe wrote:
> Hi,
>
> I have a problem with serializing a derived classes through a
> pointer to a base class. I tried registering with the syntax from the
> documentation:
>
>
> ar.template register_type<derived_one>();
>
> , which works well in case the derived class has a default
> constructor (just like the example). I just don't know what the
> syntax is for the case where the derived class does not have a
> default constructor (if I use the same syntax to register the derived
> class then I get a compilation error about the fact that there is no.
> I can provide an example in case this is not clear enough.
>
> Is it an absolute requirement for all derived classes to have a
> default constructor?
>
> Thank you and best regards,
> Dante
>
>
>
>
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
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