|
Boost Users : |
Subject: Re: [Boost-users] Different behavior of boost::serialization of strings on text archive
From: Avio (andreran_at_[hidden])
Date: 2013-07-07 13:05:30
Bjorn Reese wrote
> On 07/03/2013 12:25 PM, Andrea Ranieri wrote:
>
>> connection_.async_write("abcd", boost::bind(&client::handle_write,
>> this, boost::asio::placeholders::error));
>
> What happens if you pass std::string("abcd") as the first argument
> instead the "abcd" literal?
Thanks to everybody for the answers, and sorry for my late reply.
Yes, this was indeed the problem: the compiler had no reason to convert
"abcd" to std::string, so I was passing a const char *, that is serialized
in a different way.
Jeff Flinn-2 wrote
> Are you missing:
>
> #include <boost/serialization/string.hpp>
>
> in your actual code?
I tested this one as well, with no luck. It seems that
boost/serialization/string.hpp is almost entirely commented out by `#if 0`
blocks in boost 1.53. There should be no need for this include anymore.
Thank you again and best regards
Avio
-- View this message in context: http://boost.2283326.n4.nabble.com/Different-behavior-of-boost-serialization-of-strings-on-text-archive-tp4649294p4649465.html Sent from the Boost - Users mailing list archive at Nabble.com.
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