Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r63643 - trunk/boost/graph/distributed
From: jewillco_at_[hidden]
Date: 2010-07-05 00:18:02


Author: jewillco
Date: 2010-07-05 00:17:58 EDT (Mon, 05 Jul 2010)
New Revision: 63643
URL: http://svn.boost.org/trac/boost/changeset/63643

Log:
Allowed boost::intmax_t as a pointer serialization type to hopefully avoid problems on LLP64 systems; fixes #4366
Text files modified:
   trunk/boost/graph/distributed/unsafe_serialize.hpp | 12 +++++++++++-
   1 files changed, 11 insertions(+), 1 deletions(-)

Modified: trunk/boost/graph/distributed/unsafe_serialize.hpp
==============================================================================
--- trunk/boost/graph/distributed/unsafe_serialize.hpp (original)
+++ trunk/boost/graph/distributed/unsafe_serialize.hpp 2010-07-05 00:17:58 EDT (Mon, 05 Jul 2010)
@@ -21,6 +21,9 @@
 #include <boost/serialization/is_bitwise_serializable.hpp>
 #include <boost/mpl/bool.hpp>
 #include <boost/mpl/if.hpp>
+#include <boost/cstdint.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/type_traits.hpp>
 #include <utility>
 
 BOOST_IS_BITWISE_SERIALIZABLE(void*)
@@ -31,8 +34,15 @@
 namespace boost {
   typedef mpl::if_c<(sizeof(int) == sizeof(void*)),
                     int,
- mpl::if_c<(sizeof(long) == sizeof(void*)), long, void>::type
+ mpl::if_c<(sizeof(long) == sizeof(void*)),
+ long,
+ mpl::if_c<(sizeof(void*) <= sizeof(boost::intmax_t)),
+ boost::intmax_t,
+ void>::type
+ >::type
>::type ptr_serialize_type;
+
+ BOOST_STATIC_ASSERT ((!boost::is_void<ptr_serialize_type>::value));
     
   template<typename T> inline T& unsafe_serialize(T& x) { return x; }
 


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