Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r50500 - branches/release/boost/type_traits
From: john_at_[hidden]
Date: 2009-01-07 08:44:47


Author: johnmaddock
Date: 2009-01-07 08:44:46 EST (Wed, 07 Jan 2009)
New Revision: 50500
URL: http://svn.boost.org/trac/boost/changeset/50500

Log:
merge changes from trunk
Text files modified:
   branches/release/boost/type_traits/intrinsics.hpp | 12 +++++++++---
   branches/release/boost/type_traits/is_class.hpp | 3 ++-
   2 files changed, 11 insertions(+), 4 deletions(-)

Modified: branches/release/boost/type_traits/intrinsics.hpp
==============================================================================
--- branches/release/boost/type_traits/intrinsics.hpp (original)
+++ branches/release/boost/type_traits/intrinsics.hpp 2009-01-07 08:44:46 EST (Wed, 07 Jan 2009)
@@ -105,7 +105,8 @@
 # define BOOST_IS_ENUM(T) __is_enum(T)
 // This one doesn't quite always do the right thing:
 // # define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T)
-# define BOOST_ALIGNMENT_OF(T) __alignof(T)
+// This one fails if the default alignment has been changed with /Zp:
+// # define BOOST_ALIGNMENT_OF(T) __alignof(T)
 
 # define BOOST_HAS_TYPE_TRAITS_INTRINSICS
 #endif
@@ -126,7 +127,7 @@
 # define BOOST_HAS_TYPE_TRAITS_INTRINSICS
 #endif
 
-#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)))
+#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3) && !defined(__GCCXML__)))
 # include <boost/type_traits/is_same.hpp>
 # include <boost/type_traits/is_reference.hpp>
 # include <boost/type_traits/is_volatile.hpp>
@@ -148,7 +149,12 @@
 # define BOOST_IS_CLASS(T) __is_class(T)
 # define BOOST_IS_ENUM(T) __is_enum(T)
 # define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T)
-# define BOOST_ALIGNMENT_OF(T) __alignof__(T)
+# if !defined(unix) || defined(__LP64__)
+ // GCC sometimes lies about alignment requirements
+ // of type double on 32-bit unix platforms, use the
+ // old implementation instead in that case:
+# define BOOST_ALIGNMENT_OF(T) __alignof__(T)
+# endif
 
 # define BOOST_HAS_TYPE_TRAITS_INTRINSICS
 #endif

Modified: branches/release/boost/type_traits/is_class.hpp
==============================================================================
--- branches/release/boost/type_traits/is_class.hpp (original)
+++ branches/release/boost/type_traits/is_class.hpp 2009-01-07 08:44:46 EST (Wed, 07 Jan 2009)
@@ -27,10 +27,11 @@
 # include <boost/type_traits/is_function.hpp>
 #endif
 
+#endif // BOOST_IS_CLASS
+
 #ifdef __EDG_VERSION__
 # include <boost/type_traits/remove_cv.hpp>
 #endif
-#endif // BOOST_IS_CLASS
 
 // should be the last #include
 #include <boost/type_traits/detail/bool_trait_def.hpp>


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