Boost logo

Boost :

From: Loïc Joly (loic.actarus.joly_at_[hidden])
Date: 2005-09-09 14:44:22

Robert Ramey a écrit :

>>Of course, if I replace B const *pc by B *pc, then the code works
>>correctly.What can I do to serialize pointers to const data ?
>Or you could replace this above with:
> ar & const_cast<B *>(pc);
>(or maybe const_cast<B * &>(pc)
I really do not understand why I would have to do that.

>But that would override the normal meaning of "const" as applied to a member

In this case, the member variable is not const. It's not like in .
It's just a non const pointer that refers to a non const class defined
elsewhere, but that promise not to modify that class himself.

> You really have to ask yourself what you want serialize to
Could you please explain this point ? I do not understand what you mean.

Best regards,


Boost list run by bdawes at, gregod at, cpdaniel at, john at