Boost logo

Boost Users :

Subject: Re: [Boost-users] serialization of a ptr
From: Hazrat Pradipta Ranjali (mrdipta_at_[hidden])
Date: 2011-11-01 05:36:00


Here is my suggestion for you to try:

1. Use namespace boost serialization for those serialization method
2. take note that save is a const function, you may need to use const_cast

And if these steps does not works, you can refer to serialization examples
& tests provided on the boost package.

On Tue, Nov 1, 2011 at 13:42, Jonathan Bishop <jbishop.rwc_at_[hidden]> wrote:

> Unfortunately not. Same error.
>
> On Mon, Oct 31, 2011 at 11:03 PM, Robert Ramey <ramey_at_[hidden]> wrote:
> > Jonathan Bishop wrote:
> >> // Non-intrusive serialization (pretend I am not able to modify class
> >> X) // I was hoping serialization would use this specialization
> >>
> >> // archive X by id
> >> template<class Archive>
> >> void save(Archive& ar, constX*& x, unsigned int version) {
> >> int id = x->id;
> >> ar & id;
> >> }
> >
> > Does adding "const" as above help?
> >
> > Robert Ramey
> >
> >
> >
> >
> > _______________________________________________
> > Boost-users mailing list
> > Boost-users_at_[hidden]
> > http://lists.boost.org/mailman/listinfo.cgi/boost-users
> >
> _______________________________________________
> 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