Boost logo

Boost Users :

From: Pfligersdorffer, Christian (Christian.Pfligersdorffer_at_[hidden])
Date: 2007-01-08 11:31:37


> Ok!
> I'm starting to freaking out, because I just can't figure it out some
> compilation errors when trying to use the boost serialization library.
> I just can't manage what I'm doing wrong.
> Ok, I think that the best way to translate my problem is to post the
> code and the changes I'm trying to do:
> So ans as you can see on the attached file:
> My project and all of my classes are inside a namespace the
> FlowEngine.
>
> I have 3 classes: A; B and C to test the boost serialization.
>
> As it is now it compiles and runs good.
>
> But I take the comments of class A to split member serialization, just
> doing that I get this errors when compiling:
>
> \3rdparty\include\boost\serialization\access.hpp(93) : error C2662:
> 'void FlowEngine::A::save<Archive>(Archive &,const unsigned int)' :
> cannot convert 'this' pointer from 'const FlowEngine::A' to
> 'FlowEngine::A &'

Hi Miguel!

I am guessing: when saving you need a const object, that is your member function save() must be const. I'd check on some missing const and probably also would try to use '&' instead of '<<'.

Also: do you use the BOOST_SPLIT_BLABLA-macro?

Hope this helps you until some geek gives a thourough statement ;-)

DI Christian Pfligersdorffer
Software Engineering EOS GmbH


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