Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r78344 - trunk/boost/type_traits
From: mimomorin_at_[hidden]
Date: 2012-05-05 22:50:14


Author: michel
Date: 2012-05-05 22:50:13 EDT (Sat, 05 May 2012)
New Revision: 78344
URL: http://svn.boost.org/trac/boost/changeset/78344

Log:
Unconditionally disable clang's `__is_pod` and `__is_empty` intrinsics when used with libstdc++ 4.2. This fixes an include order issue reported by Luc Bourhis.

Added `#include <cstddef>` to pull the stdlib's version macro, as done in boost/config/select_stdlib_config.hpp.
Text files modified:
   trunk/boost/type_traits/intrinsics.hpp | 5 +++--
   1 files changed, 3 insertions(+), 2 deletions(-)

Modified: trunk/boost/type_traits/intrinsics.hpp
==============================================================================
--- trunk/boost/type_traits/intrinsics.hpp (original)
+++ trunk/boost/type_traits/intrinsics.hpp 2012-05-05 22:50:13 EDT (Sat, 05 May 2012)
@@ -124,6 +124,7 @@
 #endif
 
 #if defined(BOOST_CLANG) && defined(__has_feature)
+# include <cstddef>
 # include <boost/type_traits/is_same.hpp>
 # include <boost/type_traits/is_reference.hpp>
 # include <boost/type_traits/is_volatile.hpp>
@@ -131,10 +132,10 @@
 # if __has_feature(is_union)
 # define BOOST_IS_UNION(T) __is_union(T)
 # endif
-# if (__has_feature(is_pod) && defined(_LIBCPP_VERSION)) || __has_feature(__is_pod__)
+# if (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20080306 && __GLIBCXX__ != 20080519)) && __has_feature(is_pod)
 # define BOOST_IS_POD(T) __is_pod(T)
 # endif
-# if (__has_feature(is_empty) && defined(_LIBCPP_VERSION)) || __has_feature(__is_empty__)
+# if (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20080306 && __GLIBCXX__ != 20080519)) && __has_feature(__is_empty__)
 # define BOOST_IS_EMPTY(T) __is_empty(T)
 # endif
 # if __has_feature(has_trivial_constructor)


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