|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r54938 - trunk/libs/serialization/example
From: ramey_at_[hidden]
Date: 2009-07-13 17:47:38
Author: ramey
Date: 2009-07-13 17:47:37 EDT (Mon, 13 Jul 2009)
New Revision: 54938
URL: http://svn.boost.org/trac/boost/changeset/54938
Log:
Simplification for pointer serialization
Correct error in exported pointers for polymorphic archives
Text files modified:
trunk/libs/serialization/example/portable_binary_iarchive.cpp | 4 +---
trunk/libs/serialization/example/portable_binary_iarchive.hpp | 5 ++++-
trunk/libs/serialization/example/portable_binary_oarchive.cpp | 3 ---
3 files changed, 5 insertions(+), 7 deletions(-)
Modified: trunk/libs/serialization/example/portable_binary_iarchive.cpp
==============================================================================
--- trunk/libs/serialization/example/portable_binary_iarchive.cpp (original)
+++ trunk/libs/serialization/example/portable_binary_iarchive.cpp 2009-07-13 17:47:37 EDT (Mon, 13 Jul 2009)
@@ -112,14 +112,12 @@
m_flags = x << CHAR_BIT;
}
-// explicitly instantiate for this
-#include <boost/archive/impl/archive_pointer_iserializer.ipp>
#include <boost/archive/impl/basic_binary_iprimitive.ipp>
+
namespace boost {
namespace archive {
-template class detail::archive_pointer_iserializer<portable_binary_iarchive> ;
template class basic_binary_iprimitive<
portable_binary_iarchive,
std::istream::char_type,
Modified: trunk/libs/serialization/example/portable_binary_iarchive.hpp
==============================================================================
--- trunk/libs/serialization/example/portable_binary_iarchive.hpp (original)
+++ trunk/libs/serialization/example/portable_binary_iarchive.hpp 2009-07-13 17:47:37 EDT (Mon, 13 Jul 2009)
@@ -41,7 +41,8 @@
typedef enum {
incompatible_integer_size
} exception_code;
- portable_binary_iarchive_exception(exception_code c = incompatible_integer_size )
+ portable_binary_iarchive_exception(exception_code c = incompatible_integer_size ) :
+ boost::archive::archive_exception(boost::archive::archive_exception::other_exception)
{}
virtual const char *what( ) const throw( )
{
@@ -52,6 +53,8 @@
break;
default:
msg = boost::archive::archive_exception::what();
+ assert(false);
+ break;
}
return msg;
}
Modified: trunk/libs/serialization/example/portable_binary_oarchive.cpp
==============================================================================
--- trunk/libs/serialization/example/portable_binary_oarchive.cpp (original)
+++ trunk/libs/serialization/example/portable_binary_oarchive.cpp 2009-07-13 17:47:37 EDT (Mon, 13 Jul 2009)
@@ -78,14 +78,11 @@
save(static_cast<unsigned char>(m_flags >> CHAR_BIT));
}
-// explicitly instantiate for this type of stream
-#include <boost/archive/impl/archive_pointer_oserializer.ipp>
#include <boost/archive/impl/basic_binary_oprimitive.ipp>
namespace boost {
namespace archive {
-template class detail::archive_pointer_oserializer<portable_binary_oarchive> ;
template class basic_binary_oprimitive<
portable_binary_oarchive,
std::ostream::char_type,
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk