Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r55677 - trunk/boost/archive/detail
From: ramey_at_[hidden]
Date: 2009-08-20 01:36:17


Author: ramey
Date: 2009-08-20 01:36:16 EDT (Thu, 20 Aug 2009)
New Revision: 55677
URL: http://svn.boost.org/trac/boost/changeset/55677

Log:
Include warning when serialization pointers with implementation level set to "object_serializable" with tracking set to "track_selectively"
Text files modified:
   trunk/boost/archive/detail/iserializer.hpp | 1 +
   trunk/boost/archive/detail/oserializer.hpp | 11 ++---------
   2 files changed, 3 insertions(+), 9 deletions(-)

Modified: trunk/boost/archive/detail/iserializer.hpp
==============================================================================
--- trunk/boost/archive/detail/iserializer.hpp (original)
+++ trunk/boost/archive/detail/iserializer.hpp 2009-08-20 01:36:16 EDT (Thu, 20 Aug 2009)
@@ -65,6 +65,7 @@
 #include <boost/mpl/and.hpp>
 #include <boost/mpl/less.hpp>
 #include <boost/mpl/greater_equal.hpp>
+#include <boost/mpl/equal_to.hpp>
 #include <boost/mpl/int.hpp>
 #include <boost/mpl/list.hpp>
 #include <boost/mpl/empty.hpp>

Modified: trunk/boost/archive/detail/oserializer.hpp
==============================================================================
--- trunk/boost/archive/detail/oserializer.hpp (original)
+++ trunk/boost/archive/detail/oserializer.hpp 2009-08-20 01:36:16 EDT (Thu, 20 Aug 2009)
@@ -424,7 +424,6 @@
>::type type;
     };
 
- #if 0
     template<class T>
     struct warning_check {
         typedef
@@ -442,7 +441,6 @@
> type;
         BOOST_STATIC_CONSTANT(bool, value = type::value);
     };
- #endif
 
     // used to convert TPtr in to a pointer to a T
     template<class T>
@@ -465,14 +463,9 @@
         // will fail on load without given any valid reason for the failure.
 
         // The reason that this is permited it all is that it is results
- // in more efficient code. But it comes with it's own risk. Note
- // that serialization for collections of primitives use this method
- // so even if you avoid this "risky" behavior - it could trip you up.
+ // in more efficient code. But it comes with it's own risk.
 
- // note: I decided to comment this as as this warning is almost
- // always going to be spurious.
-
- // BOOST_STATIC_WARNING(warning_check<T>::value);
+ BOOST_STATIC_WARNING(warning_check<T>::value);
         conditional<T>::type::save(ar, const_cast<T &>(t));
     }
 


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