Boost logo

Boost :

Subject: Re: [boost] [serialization] serializing std::string*
From: Robert Ramey (ramey_at_[hidden])
Date: 2008-12-17 11:46:57

Zach Laine wrote:
>> Zach Laine wrote:
>>> It appears that std::string* is not serializable.
>> I believe that it is serialzable - but it won't be tracked - which
>> is probably not what you want.
> FWIW, some_archive & some_std_string doesn't even compile with Boost
> 1.36 and 1.37, with GCC 4.1.0.

The serialization tests suite explicitly tests serialization of std::string
on all
platforms and compilers and archives and they all pass so maybe you're
doing something wrong.

> So, why didn't you do a trick like the one used below, and save a
> std::string-derived type instead of a std::string?

This trick can only be used to turn a primitive into a serializable
type - not the other way around.

>Now users have to
> figure out this trick and presumably have to post to this list, since
> none of this is documented AFAICT.

Maybe you should look for a better documented serialization library.

If you want, you could submit a documentation patch as a TRAK item.

Robert Ramey

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