|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r48961 - in trunk/boost/archive: . impl iterators
From: ramey_at_[hidden]
Date: 2008-09-25 02:20:43
Author: ramey
Date: 2008-09-25 02:20:43 EDT (Thu, 25 Sep 2008)
New Revision: 48961
URL: http://svn.boost.org/trac/boost/changeset/48961
Log:
Fixed problems generated from unexpected sequence of static dtor calls
Fixed some minor TRAC items
Text files modified:
trunk/boost/archive/impl/archive_pointer_iserializer.ipp | 13 +++++++++----
trunk/boost/archive/impl/archive_pointer_oserializer.ipp | 15 ++++++++++-----
trunk/boost/archive/iterators/binary_from_base64.hpp | 2 +-
trunk/boost/archive/polymorphic_iarchive.hpp | 2 +-
trunk/boost/archive/polymorphic_oarchive.hpp | 2 +-
5 files changed, 22 insertions(+), 12 deletions(-)
Modified: trunk/boost/archive/impl/archive_pointer_iserializer.ipp
==============================================================================
--- trunk/boost/archive/impl/archive_pointer_iserializer.ipp (original)
+++ trunk/boost/archive/impl/archive_pointer_iserializer.ipp 2008-09-25 02:20:43 EDT (Thu, 25 Sep 2008)
@@ -70,11 +70,16 @@
template<class Archive>
BOOST_ARCHIVE_OR_WARCHIVE_DECL(BOOST_PP_EMPTY())
archive_pointer_iserializer<Archive>::~archive_pointer_iserializer(){
- std::size_t count;
- count = serialization::singleton<
+ if(! serialization::singleton<
iserializer_map<Archive>
- >::get_mutable_instance().erase(this);
- assert(count);
+ >::is_destroyed()
+ ){
+ std::size_t count;
+ count = serialization::singleton<
+ iserializer_map<Archive>
+ >::get_mutable_instance().erase(this);
+ assert(count);
+ }
}
} // namespace detail
Modified: trunk/boost/archive/impl/archive_pointer_oserializer.ipp
==============================================================================
--- trunk/boost/archive/impl/archive_pointer_oserializer.ipp (original)
+++ trunk/boost/archive/impl/archive_pointer_oserializer.ipp 2008-09-25 02:20:43 EDT (Thu, 25 Sep 2008)
@@ -70,11 +70,16 @@
archive_pointer_oserializer<Archive>::~archive_pointer_oserializer(){
// note: we need to check that the map still exists as we can't depend
// on static variables being constructed in a specific sequence
- unsigned int count;
- count = serialization::singleton<
- oserializer_map<Archive>
- >::get_mutable_instance().erase(this);
- assert(count);
+ if(! serialization::singleton<
+ oserializer_map<Archive>
+ >::is_destroyed()
+ ){
+ unsigned int count;
+ count = serialization::singleton<
+ oserializer_map<Archive>
+ >::get_mutable_instance().erase(this);
+ assert(count);
+ }
}
} // namespace detail
Modified: trunk/boost/archive/iterators/binary_from_base64.hpp
==============================================================================
--- trunk/boost/archive/iterators/binary_from_base64.hpp (original)
+++ trunk/boost/archive/iterators/binary_from_base64.hpp 2008-09-25 02:20:43 EDT (Thu, 25 Sep 2008)
@@ -43,7 +43,7 @@
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63,
- 52,53,54,55,56,57,58,59,60,61,-1,-1,-1, 0,-1,-1, // =
+ 52,53,54,55,56,57,58,59,60,61,-1,-1,-1,-1,-1,-1,
-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,
15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,
-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,
Modified: trunk/boost/archive/polymorphic_iarchive.hpp
==============================================================================
--- trunk/boost/archive/polymorphic_iarchive.hpp (original)
+++ trunk/boost/archive/polymorphic_iarchive.hpp 2008-09-25 02:20:43 EDT (Thu, 25 Sep 2008)
@@ -43,7 +43,7 @@
#define BOOST_NO_INTRINSIC_INT64_T
#else
#if defined(ULONG_MAX)
- #if(ULONG_MAX != 0xffffffff && ULONG_MAX == 18446744073709551615u) // 2**64 - 1
+ #if(ULONG_MAX != 0xffffffff && ULONG_MAX == 18446744073709551615ul) // 2**64 - 1
#define BOOST_NO_INTRINSIC_INT64_T
#endif
#else
Modified: trunk/boost/archive/polymorphic_oarchive.hpp
==============================================================================
--- trunk/boost/archive/polymorphic_oarchive.hpp (original)
+++ trunk/boost/archive/polymorphic_oarchive.hpp 2008-09-25 02:20:43 EDT (Thu, 25 Sep 2008)
@@ -42,7 +42,7 @@
#define BOOST_NO_INTRINSIC_INT64_T
#else
#if defined(ULONG_MAX)
- #if(ULONG_MAX != 0xffffffff && ULONG_MAX == 18446744073709551615u) // 2**64 - 1
+ #if(ULONG_MAX != 0xffffffff && ULONG_MAX == 18446744073709551615ul) // 2**64 - 1
#define BOOST_NO_INTRINSIC_INT64_T
#endif
#else
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