diff --git a/include/boost/type_traits.hpp b/include/boost/type_traits.hpp index 406fd02..a1c882e 100644 --- a/include/boost/type_traits.hpp +++ b/include/boost/type_traits.hpp @@ -60,7 +60,7 @@ #include #include #include -#if !defined(BOOST_BORLANDC) && !defined(__CUDACC__) +#if !defined(BOOST_BORLANDC) && (!(defined(__CUDACC__) && (__CUDACC_VER_MAJOR__ < 11)) || defined(__CUDA__)) #include #endif #include diff --git a/include/boost/type_traits/detail/config.hpp b/include/boost/type_traits/detail/config.hpp index 8ac3b4a..b10bce2 100644 --- a/include/boost/type_traits/detail/config.hpp +++ b/include/boost/type_traits/detail/config.hpp @@ -107,6 +107,9 @@ #if defined(BOOST_MSVC) && !defined(__cpp_rvalue_references) && !defined(BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE) && !defined(_NOEXCEPT_TYPES_SUPPORTED) # define BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE #endif +#if defined(__cpp_rvalue_references) && defined(__NVCC__) && defined(__CUDACC__) && !defined(BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE) +# define BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE +#endif #endif // BOOST_TT_CONFIG_HPP_INCLUDED diff --git a/include/boost/type_traits/intrinsics.hpp b/include/boost/type_traits/intrinsics.hpp index 02f2a03..72b6d90 100644 --- a/include/boost/type_traits/intrinsics.hpp +++ b/include/boost/type_traits/intrinsics.hpp @@ -160,7 +160,7 @@ # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif -#if defined(BOOST_CLANG) && defined(__has_feature) && !defined(__CUDACC__) +#if defined(BOOST_CLANG) && defined(__has_feature) && (!(defined(__CUDACC__) && (__CUDACC_VER_MAJOR__ < 11)) || defined(__CUDA__)) // // 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. diff --git a/test/has_plus_test.cpp b/test/has_plus_test.cpp index 6804eb5..dcc23a9 100644 --- a/test/has_plus_test.cpp +++ b/test/has_plus_test.cpp @@ -147,6 +147,7 @@ void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int* & >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int* &, bool & >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< double const &, int* &, bool const & >::value), 0); +#ifndef __NVCC__ BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const, bool const >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool const, int const & >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void*, bool &, bool >::value), 0); @@ -178,6 +179,7 @@ void specific() { BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, void* &, int const & >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int*, bool >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< void* const &, int* const, int & >::value), 0); +#endif BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, bool &, int >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int, int & >::value), 0); BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int*, int const, int >::value), 0); diff --git a/test/is_function_test.cpp b/test/is_function_test.cpp index cdf436e..606095b 100644 --- a/test/is_function_test.cpp +++ b/test/is_function_test.cpp @@ -56,7 +56,7 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function::value, true); -#if defined(__cpp_noexcept_function_type) && !defined(BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE) +#if defined(__cpp_noexcept_function_type) && !defined(BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE) && !defined(__NVCC__) BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function::value, true); @@ -144,7 +144,7 @@ test_cv_qual(&X::f); test_cv_qual(&X::fc); test_cv_qual(&X::fv); test_cv_qual(&X::fcv); -#ifndef BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE +#if !defined(BOOST_TT_NO_NOEXCEPT_SEPARATE_TYPE) && !defined(__NVCC__) test_cv_qual(&X::noexcept_f); #endif test_cv_qual(&X::ref_f); diff --git a/test/is_list_constructible_test.cpp b/test/is_list_constructible_test.cpp index 5541406..4dbfedd 100644 --- a/test/is_list_constructible_test.cpp +++ b/test/is_list_constructible_test.cpp @@ -88,6 +88,8 @@ BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible::va // g++ 4.x doesn't seem to disallow narrowing #elif defined(CI_SUPPRESS_KNOWN_ISSUES) && defined(__GNUC__) && (__GNUC__ == 7) && (__cplusplus >= 201500) // g++ 7.1 in -std=c++1z, c++17 has a bug +#elif defined(__NVCC__) +// nvcc in -std=c++17 mode has this issue. #else BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible::value), false); @@ -104,6 +106,8 @@ BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible::va // g++ 4.x doesn't seem to disallow narrowing #elif defined(CI_SUPPRESS_KNOWN_ISSUES) && defined(__GNUC__) && (__GNUC__ == 7) && (__cplusplus >= 201500) // g++ 7.1 in -std=c++1z, c++17 has a bug +#elif defined(__NVCC__) +// nvcc in -std=c++17 mode has this issue. #else BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_list_constructible::value), false);