Re: [Boost-bugs] [Boost C++ Libraries] #3700: boost::archive should support basic_strings with different allocators

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: 2009-11-30 17:21:43


#3700: boost::archive should support basic_strings with different allocators
-------------------------------+--------------------------------------------
  Reporter: anonymous | Owner: ramey
      Type: Feature Requests | Status: closed
 Milestone: Boost 1.42.0 | Component: serialization
   Version: Boost 1.41.0 | Severity: Optimization
Resolution: invalid | Keywords: serialization archive allocator
-------------------------------+--------------------------------------------
Changes (by ramey):

  * status: new => closed
  * type: Bugs => Feature Requests
  * resolution: => invalid

Comment:

 the string and wstring are special in that they were needed internally by
 the library so they were tagged a primitive.

 If you want to use your own variation, you can do it as you would for any
 primitive type. Derive from basic_string<char> (or basic_string<wchar_t>)
 and reimplement you're own special behavior.

 {{{
 struct my_string : public basic_string<char> {
    template<class Archive>
    void serialize, ...
    my_string(...) :
       basic_string<char>( ... my special allocator, etc)
    {
        ...
    }
 };

 ...

 }}}

 If this doesn't address what you want, feel free to reopen this track item

 Robert Ramey

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/3700#comment:1>
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:01 UTC