Re: [Boost-bugs] [Boost C++ Libraries] #10740: Multi-level containers do not cooperate with address tracking

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #10740: Multi-level containers do not cooperate with address tracking
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-09-23 14:07:29


#10740: Multi-level containers do not cooperate with address tracking
-------------------------------------+-------------------------------------
  Reporter: Simon Etter | Owner: ramey
  <ettersi@…> | Status: closed
      Type: Bugs | Component: serialization
 Milestone: To Be Determined | Severity: Problem
   Version: Boost 1.56.0 | Keywords: Address tracking, STL
Resolution: invalid | containers
-------------------------------------+-------------------------------------

Comment (by indrek@…):

 I just wasted an entire day of my life with this bug. Why has it not been
 fixed?
 Just use this patch. It fixes the problem, makes deserialize faster, and
 should not break anything existing:
 {{{#!text
 --- original.collections_load_imp.hpp 2015-09-23 16:17:14.772000000
 +0300
 +++ collections_load_imp.hpp 2015-09-23 16:26:08.396000000 +0300
 @@ -60,10 +60,9 @@
      ){
          typedef BOOST_DEDUCED_TYPENAME Container::value_type type;
          detail::stack_construct<Archive, type> t(ar, v);
 - // borland fails silently w/o full namespace
 - ar >> boost::serialization::make_nvp("item", t.reference());
          s.push_back(t.reference());
 - ar.reset_object_address(& s.back() , & t.reference());
 + // borland fails silently w/o full namespace
 + ar >> boost::serialization::make_nvp("item", s.back());
          return hint;
      }
  };
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10740#comment:14>
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:19 UTC