Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r57700 - branches/release/boost/serialization
From: ramey_at_[hidden]
Date: 2009-11-16 00:29:22


Author: ramey
Date: 2009-11-16 00:29:21 EST (Mon, 16 Nov 2009)
New Revision: 57700
URL: http://svn.boost.org/trac/boost/changeset/57700

Log:
Revert changes intended for trunk
Text files modified:
   branches/release/boost/serialization/array.hpp | 34 +++++++++++++---------------------
   branches/release/boost/serialization/binary_object.hpp | 9 ++-------
   branches/release/boost/serialization/extended_type_info_no_rtti.hpp | 2 +-
   branches/release/boost/serialization/extended_type_info_typeid.hpp | 3 +--
   branches/release/boost/serialization/shared_ptr.hpp | 23 ++++-------------------
   branches/release/boost/serialization/singleton.hpp | 13 +------------
   branches/release/boost/serialization/variant.hpp | 4 +---
   branches/release/boost/serialization/void_cast.hpp | 9 ---------
   8 files changed, 23 insertions(+), 74 deletions(-)

Modified: branches/release/boost/serialization/array.hpp
==============================================================================
--- branches/release/boost/serialization/array.hpp (original)
+++ branches/release/boost/serialization/array.hpp 2009-11-16 00:29:21 EST (Mon, 16 Nov 2009)
@@ -6,7 +6,16 @@
 // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
+#include <boost/serialization/nvp.hpp>
+#include <boost/serialization/split_member.hpp>
+#include <boost/serialization/wrapper.hpp>
+#include <boost/mpl/always.hpp>
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/type_traits/remove_const.hpp>
+#include <boost/array.hpp>
 #include <iostream>
+
 #include <cstddef> // std::size_t
 #include <cstddef>
 #include <boost/config.hpp> // msvc 6.0 needs this for warning suppression
@@ -16,15 +25,6 @@
 } // namespace std
 #endif
 
-#include <boost/serialization/nvp.hpp>
-#include <boost/serialization/split_member.hpp>
-#include <boost/serialization/wrapper.hpp>
-#include <boost/mpl/always.hpp>
-#include <boost/mpl/apply.hpp>
-#include <boost/mpl/bool.hpp>
-#include <boost/type_traits/remove_const.hpp>
-#include <boost/array.hpp>
-
 namespace boost { namespace serialization {
 
 // traits to specify whether to use an optimized array serialization
@@ -42,8 +42,8 @@
 #endif
 
 template<class T>
-class array :
- public wrapper_traits<const array<T> >
+class array
+ : public wrapper_traits<const array<T> >
 {
 public:
     typedef T value_type;
@@ -52,15 +52,7 @@
         m_t(t),
         m_element_count(s)
     {}
- array(const array & rhs) :
- m_t(rhs.m_t),
- m_element_count(rhs.m_element_count)
- {}
- array & operator=(const array & rhs){
- m_t = rhs.m_t;
- m_element_count = rhs.m_element_count;
- }
-
+
     // default implementation
     template<class Archive>
     void serialize_optimized(Archive &ar, const unsigned int, mpl::false_ ) const
@@ -116,7 +108,7 @@
     
 private:
     value_type* m_t;
- std::size_t m_element_count;
+ std::size_t const m_element_count;
 };
 
 template<class T>

Modified: branches/release/boost/serialization/binary_object.hpp
==============================================================================
--- branches/release/boost/serialization/binary_object.hpp (original)
+++ branches/release/boost/serialization/binary_object.hpp 2009-11-16 00:29:21 EST (Mon, 16 Nov 2009)
@@ -39,8 +39,8 @@
 struct binary_object :
     public wrapper_traits<nvp<const binary_object> >
 {
- void const * m_t;
- std::size_t m_size;
+ /* const */ void * const m_t;
+ const std::size_t m_size;
     template<class Archive>
     void save(Archive & ar, const unsigned int /* file_version */) const {
         ar.save_binary(m_t, m_size);
@@ -50,11 +50,6 @@
         ar.load_binary(const_cast<void *>(m_t), m_size);
     }
     BOOST_SERIALIZATION_SPLIT_MEMBER()
- binary_object & operator=(const binary_object & rhs) {
- m_t = rhs.m_t;
- m_size = rhs.m_size;
- return *this;
- }
     binary_object(/* const */ void * const t, std::size_t size) :
         m_t(t),
         m_size(size)

Modified: branches/release/boost/serialization/extended_type_info_no_rtti.hpp
==============================================================================
--- branches/release/boost/serialization/extended_type_info_no_rtti.hpp (original)
+++ branches/release/boost/serialization/extended_type_info_no_rtti.hpp 2009-11-16 00:29:21 EST (Mon, 16 Nov 2009)
@@ -34,7 +34,7 @@
 #include <boost/config/abi_prefix.hpp> // must be the last header
 #ifdef BOOST_MSVC
 # pragma warning(push)
-# pragma warning(disable : 4251 4231 4660 4275 4511 4512)
+# pragma warning(disable : 4251 4231 4660 4275)
 #endif
 
 namespace boost {

Modified: branches/release/boost/serialization/extended_type_info_typeid.hpp
==============================================================================
--- branches/release/boost/serialization/extended_type_info_typeid.hpp (original)
+++ branches/release/boost/serialization/extended_type_info_typeid.hpp 2009-11-16 00:29:21 EST (Mon, 16 Nov 2009)
@@ -35,10 +35,9 @@
 #include <boost/mpl/if.hpp>
 
 #include <boost/config/abi_prefix.hpp> // must be the last header
-
 #ifdef BOOST_MSVC
 # pragma warning(push)
-# pragma warning(disable : 4251 4231 4660 4275 4511 4512)
+# pragma warning(disable : 4251 4231 4660 4275)
 #endif
 
 namespace boost {

Modified: branches/release/boost/serialization/shared_ptr.hpp
==============================================================================
--- branches/release/boost/serialization/shared_ptr.hpp (original)
+++ branches/release/boost/serialization/shared_ptr.hpp 2009-11-16 00:29:21 EST (Mon, 16 Nov 2009)
@@ -108,7 +108,6 @@
     ar << boost::serialization::make_nvp("px", t_ptr);
 }
 
-#ifdef BOOST_SERIALIZATION_SHARED_PTR_132_HPP
 template<class Archive, class T>
 inline void load(
     Archive & ar,
@@ -120,6 +119,7 @@
     // is never tracked by default. Wrap int in a trackable type
     BOOST_STATIC_ASSERT((tracking_level<T>::value != track_never));
     T* r;
+ #ifdef BOOST_SERIALIZATION_SHARED_PTR_132_HPP
     if(file_version < 1){
         //ar.register_type(static_cast<
         // boost_132::detail::sp_counted_base_impl<T *, boost::checked_deleter<T> > *
@@ -134,29 +134,14 @@
         ar.append(sp);
         r = sp.get();
     }
- else{
+ else
+ #endif
+ {
         ar >> boost::serialization::make_nvp("px", r);
     }
     ar.reset(t,r);
 }
 
-#else
-template<class Archive, class T>
-inline void load(
- Archive & ar,
- boost::shared_ptr<T> &t,
- const unsigned int /*file_version*/
-){
- // The most common cause of trapping here would be serializing
- // something like shared_ptr<int>. This occurs because int
- // is never tracked by default. Wrap int in a trackable type
- BOOST_STATIC_ASSERT((tracking_level<T>::value != track_never));
- T* r;
- ar >> boost::serialization::make_nvp("px", r);
- ar.reset(t,r);
-}
-#endif
-
 template<class Archive, class T>
 inline void serialize(
     Archive & ar,

Modified: branches/release/boost/serialization/singleton.hpp
==============================================================================
--- branches/release/boost/serialization/singleton.hpp (original)
+++ branches/release/boost/serialization/singleton.hpp 2009-11-16 00:29:21 EST (Mon, 16 Nov 2009)
@@ -35,15 +35,9 @@
 #endif
 
 #include <cassert>
-#include <boost/config.hpp>
 #include <boost/noncopyable.hpp>
 #include <boost/serialization/force_include.hpp>
 
-#ifdef BOOST_MSVC
-# pragma warning(push)
-# pragma warning(disable : 4511 4512)
-#endif
-
 namespace boost {
 namespace serialization {
 
@@ -77,8 +71,7 @@
 // attempt to retieve a mutable instances while locked will
 // generate a assertion if compiled for debug.
 
-class singleton_module :
- public boost::noncopyable
+class singleton_module : public boost::noncopyable
 {
 private:
     static bool & get_lock(){
@@ -151,8 +144,4 @@
 } // namespace serialization
 } // namespace boost
 
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
 #endif // BOOST_SERIALIZATION_SINGLETON_HPP

Modified: branches/release/boost/serialization/variant.hpp
==============================================================================
--- branches/release/boost/serialization/variant.hpp (original)
+++ branches/release/boost/serialization/variant.hpp 2009-11-16 00:29:21 EST (Mon, 16 Nov 2009)
@@ -46,9 +46,7 @@
 namespace serialization {
 
 template<class Archive>
-struct variant_save_visitor :
- boost::static_visitor<>
-{
+struct variant_save_visitor : boost::static_visitor<> {
     variant_save_visitor(Archive& ar) :
         m_ar(ar)
     {}

Modified: branches/release/boost/serialization/void_cast.hpp
==============================================================================
--- branches/release/boost/serialization/void_cast.hpp (original)
+++ branches/release/boost/serialization/void_cast.hpp 2009-11-16 00:29:21 EST (Mon, 16 Nov 2009)
@@ -143,11 +143,6 @@
     virtual ~void_caster(){}
 };
 
-#ifdef BOOST_MSVC
-# pragma warning(push)
-# pragma warning(disable : 4251 4231 4660 4275 4511 4512)
-#endif
-
 template <class Derived, class Base>
 class void_caster_primitive :
     public void_caster
@@ -216,10 +211,6 @@
     ~void_caster_virtual_base();
 };
 
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
 template <class Derived, class Base>
 void_caster_virtual_base<Derived,Base>::void_caster_virtual_base() :
     void_caster(


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