From 03d9c110267183a78f2dfbb0bd74b6353fc7fdaf Mon Sep 17 00:00:00 2001 From: John Maddock Date: Wed, 12 Nov 2008 18:13:36 +0000 Subject: [PATCH] Fix 32-bit Linux alignment_of failure. [SVN r49704] --- include/boost/type_traits/intrinsics.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/boost/type_traits/intrinsics.hpp b/include/boost/type_traits/intrinsics.hpp index 3458b9f..1e7d250 100644 --- a/include/boost/type_traits/intrinsics.hpp +++ b/include/boost/type_traits/intrinsics.hpp @@ -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