Boost logo

Boost :

Subject: [boost] [serialization] serializing std::string*
From: Zach Laine (whatwasthataddress_at_[hidden])
Date: 2008-12-16 17:03:00


It appears that std::string* is not serializable. I have need to
serialize them, and I'm considering adding the old, unused code in
boost/serialization/string.hpp (the stuff #if 0-ed out and marked with
"left over from a previous incarnation - strings are now always
primitive types") to serialize std::string*'s. I have 2 questions
before doing so.

1) What is the rationale for making std::string a primitive,
track_never type? After an extensive rereading of the docs, I'm left
with only a hazy understanding of what the implications are for
primitive vs. non-primitive status.

2) Can Robert (or anyone else) give me a sense for how likely I am to
get myself into trouble doing this? If it matters, I don't need to be
able to read old archives containing std::string's.

Thanks,
Zach Laine


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk