$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] Serialization with pointer to const object
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2009-07-25 16:34:16
On Fri, Jul 24, 2009 at 8:06 PM, Robert Ramey<ramey_at_[hidden]> wrote:
> Emil Dotchevski wrote:
>> On Fri, Jul 24, 2009 at 4:40 PM, Robert Ramey<ramey_at_[hidden]> wrote:
> would be equivalent to
> ar >> *m_x
> in which case the "const" would be violated.
At the time the object needs to be instantiated and read, instead of
dealing with a T const * p as:
p=new T;
ar >> *p;
what's wrong with:
T * tmp=new T;
ar >> * tmp;
p=tmp;
?
Emil Dotchevski
Reverge Studios, Inc.
http://www.revergestudios.com/reblog/index.php?n=ReCode