--- boost_1_42_0.orig/libs/serialization/src/shared_ptr_helper.cpp 2010-02-23 11:18:13.203607300 -0800 +++ boost_1_42_0/libs/serialization/src/shared_ptr_helper.cpp 2010-02-23 11:34:00.650083500 -0800 @@ -66,11 +66,13 @@ collection_type::iterator i = m_pointers->find(sp); if(i == m_pointers->end()){ - std::pair result; - shared_ptr sp(const_cast(od), void_deleter(true_type)); - result = m_pointers->insert(sp); - assert(result.second); - i = result.first; + // temp: std::pair result; + // temp: shared_ptr sp(const_cast(od), void_deleter(true_type)); + // temp: result = m_pointers->insert(sp); + // temp: assert(result.second); + // temp: i = result.first; + shared_ptr np; + return np; } od = void_upcast( *true_type, @@ -92,6 +94,22 @@ ); } +BOOST_ARCHIVE_DECL(void) +shared_ptr_helper::append(const boost::shared_ptr &sp){ + + // make tracking array if necessary + if(NULL == m_pointers) + m_pointers = new collection_type; + + collection_type::iterator i = m_pointers->find(sp); + + if(i == m_pointers->end()){ + std::pair result; + result = m_pointers->insert(sp); + assert(result.second); + } +} + // #ifdef BOOST_SERIALIZATION_SHARED_PTR_132_HPP BOOST_ARCHIVE_DECL(void) shared_ptr_helper::append(const boost_132::shared_ptr & t){ 123a124,126 > BOOST_ARCHIVE_DECL(void) > append(const boost::shared_ptr &); > 182,185c185,202 < s = shared_ptr( < r, < static_cast(r.get()) < ); --- > if (!r) > { > s.reset(t); > const void * od = void_downcast( > *true_type, > *this_type, > static_cast(t) > ); > shared_ptr sp(s, od); > append(sp); > } > else > { > s = shared_ptr( > r, > static_cast(r.get()) > ); > }