From 9b12c8ad6a0e9947c5bf930e782dd3f4d0fc6dba Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Mon, 10 Nov 2014 17:58:14 +0000 Subject: [PATCH] Fix for CUDA on Clang compilation failure when including type traits headers. See https://svn.boost.org/trac/boost/ticket/10694. --- include/boost/type_traits/intrinsics.hpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/boost/type_traits/intrinsics.hpp b/include/boost/type_traits/intrinsics.hpp index 8bccb6f..af29da5 100644 --- a/include/boost/type_traits/intrinsics.hpp +++ b/include/boost/type_traits/intrinsics.hpp @@ -132,7 +132,13 @@ # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif -#if defined(BOOST_CLANG) && defined(__has_feature) +#if defined(BOOST_CLANG) && defined(__has_feature) && !defined(__CUDACC__) +// +// Note that these intrinsics are disabled for the CUDA meta-compiler as it appears +// to not support them, even though the underlying clang compiler does so. +// This is a rubbish fix as it basically stops type traits from working correctly, +// but maybe the best we can do for now. See https://svn.boost.org/trac/boost/ticket/10694 +// # include # include # include