Boost logo

Boost Users :

Subject: Re: [Boost-users] [serialization] Serializing const* toserializeddata
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2009-11-06 19:15:27


On Fri, Nov 6, 2009 at 4:01 PM, Michael Caisse
<boost_at_[hidden]> wrote:
> Emil Dotchevski wrote:
>> On Fri, Nov 6, 2009 at 3:03 PM, Robert Ramey <ramey_at_[hidden]> wrote:
>>> Emil Dotchevski wrote:
>>>> Either way, why does it matter if we're dealing with a
>>>> pointer-to-const?
>>> It doesn't.
>>>
>>> The error/warning or whatever for using a "const" is
>>> unrelated to this.  It's being considered what it means
>>> to load a pointer to a const object  and whether
>>> or not this should be trapped.  This is the subject
>>> of a Track Item.
>>
>> This is not a pointer to a const object. It is a const pointer to a
>> mutable object.
>
> A const* ptr_to_item_in_B_items;
>
>        is a pointer to a constant (immutable) A

I wrote it wrong in my previous post and it confused you, I meant to
say that we have a pointer-to-const that points a mutable object. In
other words, you can't modify the object through that pointer but when
the pointer is serialized there is no need to modify the object
through the pointer because in all cases the serialization library has
another pointer to the same object.

Emil Dotchevski
Reverge Studios, Inc.
http://www.revergestudios.com/reblog/index.php?n=ReCode


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