|
Boost Users : |
Subject: [Boost-users] [serialization] Support for smart pointers?
From: Robert Dailey (rcdailey_at_[hidden])
Date: 2009-01-29 15:34:04
Hi,
The documentation for Boost.Serialization states that support for
loading/saving pointers is fully supported out of the box. However, what if
I want to use smart pointers, such a boost::scoped_ptr?
Right now I believe I would have to do this:
Foo* foo1;
archive & foo1;
boost::scoped_ptr<Foo> foo2( foo1 );
I was thinking it would be convenient to avoid the extra variable (foo1) and
do this:
boost::scoped_ptr<Foo> foo2;
archive & foo2;
Is this possible?
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