Boost logo

Boost Users :

From: Jan Tinkhof (boost_at_[hidden])
Date: 2006-08-14 11:25:56


Robert Ramey wrote:

[snip]
> // *** replace this
> // mystruct** ppa = &pa;
> // *** with this
> mysturct ** const ppa = &pa;
>
>> oarchive << ppa;
>>
>> }
>
> *** read the rationale section on why this trap occurs.
>
> Robert Ramey

Thanks for your reply, Robert. :)

However, I had already dealt with the trap by removing it from the code.
(Yes, I know it is not recommended. Sorry for misleading you here.)

Either way, once I get past the trap, I still have another error to deal
with. It looks like this on my compiler (VC 8.0):

>
> d:\projekt\boost_1_33_1\boost\serialization\access.hpp(109) : error C2228: left of '.serialize' must have class/struct/union
> type is 'mystruct *'
> did you intend to use '->' instead?
> d:\projekt\boost_1_33_1\boost\serialization\serialization.hpp(81) : see reference to function template instantiation 'void boost::serialization::access::serialize<Archive,T>(Archive &,T &,const unsigned int)' being compiled
> with
> [
> Archive=boost::archive::text_oarchive,
> T=mystruct *
> ]
> [snip 16 more template expansions]
>

This only happens with the pointer-to-pointer type, serializing the
regular pointer works ok.


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