Boost logo

Boost Users :

Subject: [Boost-users] [serialization] how to serialize map of non-default-constructible?
From: ivo.t_at_[hidden]
Date: 2009-11-24 11:25:40


Hi to everybody,

I'm pretty new to the list, work for some time with Boost and C++ and have a
fair knowledge but am not an expert yet. I try to serialize a map whose type
is not default-constructible, and I'm seriously stuck there. I thought the
load_construct_data and save_construct_data overrides would help me there,
but that seems not to be the case. I tried to create a private default
constructor hoping that the map (respectively pair) constructor could access
it, due to the boost::serialization::access friend declaration, but that
didn't work as well. I really do _not_ want to make a public default
constructor. What could I do as a workaround??

Any help would be greatly appreciated!!

Btw, I work with Boost 1.39 and Visual Studio 2005.

Thank you very much in advance

Ivo


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