Boost logo

Boost Users :

Subject: Re: [Boost-users] [serialization] Serializing const* toserializeddata
From: Michael Caisse (boost_at_[hidden])
Date: 2009-11-06 19:01:58


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

A * const ptr_to_item_in_B_items;

        is a constant pointer to a mutable A object

The example has the former. Or did I miss something?

michael

-- 
----------------------------------
Michael Caisse
Object Modeling Designs
www.objectmodelingdesigns.com

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