Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r58024 - in trunk/boost: archive serialization
From: ramey_at_[hidden]
Date: 2009-11-29 01:32:33


Author: ramey
Date: 2009-11-29 01:32:32 EST (Sun, 29 Nov 2009)
New Revision: 58024
URL: http://svn.boost.org/trac/boost/changeset/58024

Log:
Backout collection_type primitive. Problem showed in in tests of 64 bit compilers
Text files modified:
   trunk/boost/archive/basic_text_iprimitive.hpp | 1 +
   trunk/boost/archive/basic_text_oprimitive.hpp | 16 ----------------
   trunk/boost/serialization/collections_save_imp.hpp | 2 +-
   trunk/boost/serialization/slist.hpp | 2 +-
   trunk/boost/serialization/void_cast.hpp | 4 ++--
   5 files changed, 5 insertions(+), 20 deletions(-)

Modified: trunk/boost/archive/basic_text_iprimitive.hpp
==============================================================================
--- trunk/boost/archive/basic_text_iprimitive.hpp (original)
+++ trunk/boost/archive/basic_text_iprimitive.hpp 2009-11-29 01:32:32 EST (Sun, 29 Nov 2009)
@@ -47,6 +47,7 @@
 #include <boost/io/ios_state.hpp>
 #include <boost/scoped_ptr.hpp>
 
+#include <boost/serialization/collection_size_type.hpp>
 #include <boost/serialization/throw_exception.hpp>
 #include <boost/archive/archive_exception.hpp>
 #include <boost/archive/basic_streambuf_locale_saver.hpp>

Modified: trunk/boost/archive/basic_text_oprimitive.hpp
==============================================================================
--- trunk/boost/archive/basic_text_oprimitive.hpp (original)
+++ trunk/boost/archive/basic_text_oprimitive.hpp 2009-11-29 01:32:32 EST (Sun, 29 Nov 2009)
@@ -137,22 +137,6 @@
         os << static_cast<int>(t);
     }
     #endif
- void save(const std::size_t t)
- {
- if(os.fail())
- boost::serialization::throw_exception(
- archive_exception(archive_exception::stream_error)
- );
- os << static_cast<std::streamsize>(t);
- }
- void save(const boost::serialization::collection_size_type t)
- {
- if(os.fail())
- boost::serialization::throw_exception(
- archive_exception(archive_exception::stream_error)
- );
- os << static_cast<std::streamsize>(t);
- }
     void save(const float t)
     {
         // must be a user mistake - can't serialize un-initialized data

Modified: trunk/boost/serialization/collections_save_imp.hpp
==============================================================================
--- trunk/boost/serialization/collections_save_imp.hpp (original)
+++ trunk/boost/serialization/collections_save_imp.hpp 2009-11-29 01:32:32 EST (Sun, 29 Nov 2009)
@@ -47,7 +47,7 @@
         ar << BOOST_SERIALIZATION_NVP(item_version);
     }
     BOOST_DEDUCED_TYPENAME Container::const_iterator it = s.begin();
- std::size_t c=count;
+ collection_size_type c=count;
     while(c-- > 0){
             // note borland emits a no-op without the explicit namespace
             boost::serialization::save_construct_data_adl(

Modified: trunk/boost/serialization/slist.hpp
==============================================================================
--- trunk/boost/serialization/slist.hpp (original)
+++ trunk/boost/serialization/slist.hpp 2009-11-29 01:32:32 EST (Sun, 29 Nov 2009)
@@ -69,7 +69,7 @@
     t.push_front(u.reference());
     BOOST_DEDUCED_TYPENAME BOOST_STD_EXTENSION_NAMESPACE::slist<U, Allocator>::iterator last;
     last = t.begin();
- std::size_t c = count;
+ collection_size_type c = count;
     while(--c > 0){
         boost::serialization::detail::stack_construct<Archive, U>
             u(ar, file_version);

Modified: trunk/boost/serialization/void_cast.hpp
==============================================================================
--- trunk/boost/serialization/void_cast.hpp (original)
+++ trunk/boost/serialization/void_cast.hpp 2009-11-29 01:32:32 EST (Sun, 29 Nov 2009)
@@ -168,7 +168,7 @@
     }
 public:
     void_caster_primitive();
- ~void_caster_primitive();
+ virtual ~void_caster_primitive();
 };
 
 template <class Derived, class Base>
@@ -213,7 +213,7 @@
         return b;
     }
     void_caster_virtual_base();
- ~void_caster_virtual_base();
+ virtual ~void_caster_virtual_base();
 };
 
 #ifdef BOOST_MSVC


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