Subject: Re: [Boost-bugs] [Boost C++ Libraries] #3700: boost::archive should support basic_strings with different allocators
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-05-27 01:25:13
#3700: boost::archive should support basic_strings with different allocators
-------------------------------+--------------------------------------------
Reporter: anonymous | Owner: ramey
Type: Feature Requests | Status: reopened
Milestone: | Component: serialization
Version: Boost 1.41.0 | Severity: Optimization
Resolution: | Keywords: serialization archive allocator
-------------------------------+--------------------------------------------
Changes (by anonymous):
* status: closed => reopened
* resolution: invalid =>
* milestone: Boost 1.42.0 =>
Comment:
Hi,
The problem here is that we have our string object defined as:
typedef
std::basic_string<std::string::value_type,std::string::traits_type,MyAllocator>
MyString;
boost::serialization should be able to serialize this object the same way
it does a std::string. Instead it serializes it as a char array which
causes very large and ugly xml.
The reason is that in the boost serialization class it uses std::string
directly. Instead all functions that are hardcoded as std::string as
primitive types, they should instead be templates that use
std::basic_string<A,B,C> so they work with any basic_string type.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3700#comment:2> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:03 UTC