Boost logo

Boost Users :

Subject: Re: [Boost-users] Different behavior of boost::serialization of strings on text archive
From: Jeff Flinn (Jeffrey.Flinn_at_[hidden])
Date: 2013-07-03 12:14:40


On 7/3/2013 6:25 AM, Andrea Ranieri wrote:
> Hi all,
>
> I'm having some issue serializing a `std::string` with
> `boost::serialization` on a `text_oarchive`. AFAICT, I have two
> identical pieces of code that behaves differently in two different programs.
>
> This is the program that I believe is behaving correctly:
>
> #include <iostream>
> #include <string>
> #include <sstream>
>
> #include <boost/archive/text_iarchive.hpp>
> #include <boost/archive/text_oarchive.hpp>
>
> template <typename T>
> void serialize_deserialize(const T & src, T & dst)
> {

Are you missing:

#include <boost/serialization/string.hpp>

in your actual code?

Jeff


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