Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r49704 - trunk/boost/type_traits
From: john_at_[hidden]
Date: 2008-11-12 13:13:37


Author: johnmaddock
Date: 2008-11-12 13:13:36 EST (Wed, 12 Nov 2008)
New Revision: 49704
URL: http://svn.boost.org/trac/boost/changeset/49704

Log:
Fix 32-bit Linux alignment_of failure.
Text files modified:
   trunk/boost/type_traits/intrinsics.hpp | 7 ++++++-
   1 files changed, 6 insertions(+), 1 deletions(-)

Modified: trunk/boost/type_traits/intrinsics.hpp
==============================================================================
--- trunk/boost/type_traits/intrinsics.hpp (original)
+++ trunk/boost/type_traits/intrinsics.hpp 2008-11-12 13:13:36 EST (Wed, 12 Nov 2008)
@@ -148,7 +148,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


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