Boost logo

Boost Users :

Subject: Re: [Boost-users] [serialization] Custom Shared pointer
From: Francois Mauger (mauger_at_[hidden])
Date: 2013-04-22 19:27:58


Hi Jari,

As far as I know (and have used it for years), boost::shared_ptr<> is
fully supported by Boost/Serialization. Particularly I use a wrapper
template class with a boost::shared_ptr<> attribute. There is also
additionnal code to equip this wrapper class with the
::boost::serialization::track_never trait.
At the end, it works perfectly.

regards

frc

--
 >> Le 23/04/2013 00:31, Jari a écrit :
> no one has answered yet.
> my main question simply is does boost  serialization support smart
> pointers or is that more or less unimplemented yet?
> i maybe trying to use boost to something it can't do.
>
> thanks
>
>
> On Sun, Apr 14, 2013 at 9:22 AM, Jari <jaristr_at_[hidden]
> <mailto:jaristr_at_[hidden]>> wrote:
>
>     hi
>     i have couple questions about boost serilazation regarding shared
>     pointers. First off i was wondering if boost::shared_ptr has
>     working serilazation code? if so maybe i can learn from there.
>
>     What's im trying to do is save fairly simple custom shared-pointer
>     class. All it should take is to save the pointer in the class and
>     ref count as well the Parent variable which is  pointer to the
>     parent shared-pointer.
>
>     what needs to be considered for this? should i disable tracking for
>     the shared-pointer and does the pointer stored in the shared-pointer
>     require some special considerations?
>
>     thanks.
>
>
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
-- 
François Mauger
   Groupe "Interactions Fondamentales et Nature du Neutrino"
   NEMO-3/SuperNEMO Collaboration
LPC Caen-CNRS/IN2P3-UCBN-ENSICAEN
Département de Physique -- Université de Caen Basse-Normandie
Adresse/address:
   Laboratoire de Physique Corpusculaire de Caen (UMR 6534)
   ENSICAEN
   6, Boulevard du Marechal Juin
   14050 CAEN Cedex
   FRANCE
Courriel/e-mail: mauger_at_[hidden]
Tél./phone:      02 31 45 25 12 / (+33) 2 31 45 25 12
Fax:             02 31 45 25 49 / (+33) 2 31 45 25 49

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