fix to permit shared_ptr from this to work

[SVN r60274]
This commit is contained in:
Robert Ramey
2010-03-07 02:46:13 +00:00
parent 77c54c0f18
commit c55a87b323

View File

@@ -4,7 +4,7 @@
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// shared_ptr_helper.hpp: serialization for boost shared pointer
// shared_ptr_helper.hpp: serialization for boost shared pointern
// (C) Copyright 2004-2009 Robert Ramey, Martin Ecker and Takatoshi Kondo
// Use, modification and distribution is subject to the Boost Software
@@ -66,11 +66,8 @@ shared_ptr_helper::get_od(
collection_type::iterator i = m_pointers->find(sp);
if(i == m_pointers->end()){
std::pair<collection_type::iterator, bool> result;
shared_ptr<const void> sp(const_cast<void * >(od), void_deleter(true_type));
result = m_pointers->insert(sp);
assert(result.second);
i = result.first;
shared_ptr<void> np;
return np;
}
od = void_upcast(
*true_type,
@@ -92,6 +89,21 @@ shared_ptr_helper::get_od(
);
}
BOOST_ARCHIVE_DECL(void)
shared_ptr_helper::append(const boost::shared_ptr<const void> &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<collection_type::iterator, bool> 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<const void> & t){