Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r56222 - trunk/boost/archive
From: ramey_at_[hidden]
Date: 2009-09-15 16:21:33


Author: ramey
Date: 2009-09-15 16:21:32 EDT (Tue, 15 Sep 2009)
New Revision: 56222
URL: http://svn.boost.org/trac/boost/changeset/56222

Log:
Formalize compiler time errors and warnings
fix archive_exception conflict with windows header
improve portability of codecvt_null
Text files modified:
   trunk/boost/archive/archive_exception.hpp | 9 +++++++++
   trunk/boost/archive/basic_archive.hpp | 2 +-
   trunk/boost/archive/basic_binary_oarchive.hpp | 2 +-
   trunk/boost/archive/codecvt_null.hpp | 4 +++-
   4 files changed, 14 insertions(+), 3 deletions(-)

Modified: trunk/boost/archive/archive_exception.hpp
==============================================================================
--- trunk/boost/archive/archive_exception.hpp (original)
+++ trunk/boost/archive/archive_exception.hpp 2009-09-15 16:21:32 EDT (Tue, 15 Sep 2009)
@@ -20,9 +20,18 @@
 #include <cassert>
 #include <string>
 
+#include <boost/config.hpp>
 #include <boost/preprocessor/empty.hpp>
 #include <boost/archive/detail/decl.hpp>
 
+// note: the only reason this is in here is that windows header
+// includes #define exception_code _exception_code (arrrgghhhh!).
+// the most expedient way to address this is be sure that this
+// header is always included whenever this header file is included.
+#if defined(BOOST_WINDOWS)
+#include <excpt.h>
+#endif
+
 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
 
 namespace boost {

Modified: trunk/boost/archive/basic_archive.hpp
==============================================================================
--- trunk/boost/archive/basic_archive.hpp (original)
+++ trunk/boost/archive/basic_archive.hpp 2009-09-15 16:21:32 EDT (Tue, 15 Sep 2009)
@@ -34,7 +34,7 @@
 BOOST_STRONG_TYPEDEF(unsigned int, object_reference_type)
 
 struct tracking_type {
- typedef bool value_type;
+// typedef bool value_type;
     bool t;
     explicit tracking_type(const bool t_ = false)
         : t(t_)

Modified: trunk/boost/archive/basic_binary_oarchive.hpp
==============================================================================
--- trunk/boost/archive/basic_binary_oarchive.hpp (original)
+++ trunk/boost/archive/basic_binary_oarchive.hpp 2009-09-15 16:21:32 EDT (Tue, 15 Sep 2009)
@@ -85,7 +85,7 @@
     }
     void save_override(const class_id_reference_type & t, int){
         // upto 32K classes
- assert(t.t <= boost::integer_traits<boost::uint_least16_t>::const_max);
+ assert(t.t <= boost::integer_traits<boost::int_least16_t>::const_max);
         const boost::uint_least16_t x = t.t;
         * this->This() << x;
     }

Modified: trunk/boost/archive/codecvt_null.hpp
==============================================================================
--- trunk/boost/archive/codecvt_null.hpp (original)
+++ trunk/boost/archive/codecvt_null.hpp 2009-09-15 16:21:32 EDT (Tue, 15 Sep 2009)
@@ -24,13 +24,15 @@
 #include <boost/archive/detail/abi_prefix.hpp> // must be the last header
 
 #if defined(BOOST_NO_STDC_NAMESPACE)
+namespace std {
 // For STLport on WinCE, BOOST_NO_STDC_NAMESPACE can get defined if STLport is putting symbols in its own namespace.
 // In the case of codecvt, however, this does not mean that codecvt is in the global namespace (it will be in STLport's namespace)
-# if !defined(UNDER_CE) || (!defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION))
+# if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
     using ::codecvt;
 # endif
     using ::mbstate_t;
     using ::size_t;
+} // namespace
 #endif
 
 namespace boost {


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