28-cudacc.patch 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. diff --git a/include/__iterator/segmented_iterator.h b/include/__iterator/segmented_iterator.h
  2. index f3cd1e5..c0a77ef 100644
  3. --- a/include/__iterator/segmented_iterator.h
  4. +++ b/include/__iterator/segmented_iterator.h
  5. @@ -68,8 +68,10 @@ struct __segmented_iterator_traits;
  6. template <class _Tp, size_t = 0>
  7. struct __has_specialization : false_type {};
  8. +#ifndef __CUDACC__
  9. template <class _Tp>
  10. struct __has_specialization<_Tp, sizeof(_Tp) * 0> : true_type {};
  11. +#endif
  12. template <class _Iterator>
  13. using __is_segmented_iterator = __has_specialization<__segmented_iterator_traits<_Iterator> >;
  14. diff --git a/include/__math/traits.h b/include/__math/traits.h
  15. index da585af..bc68e78 100644
  16. --- a/include/__math/traits.h
  17. +++ b/include/__math/traits.h
  18. @@ -67,7 +67,7 @@ _LIBCPP_NODISCARD_EXT _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool i
  19. return false;
  20. }
  21. -#ifdef _LIBCPP_PREFERRED_OVERLOAD
  22. +#ifdef _LIBCPP_PREFERRED_OVERLOAD && !defined(__CUDACC__)
  23. _LIBCPP_NODISCARD_EXT inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool isinf(float __x) _NOEXCEPT {
  24. return __builtin_isinf(__x);
  25. }
  26. @@ -94,7 +94,7 @@ _LIBCPP_NODISCARD_EXT _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool i
  27. return false;
  28. }
  29. -#ifdef _LIBCPP_PREFERRED_OVERLOAD
  30. +#ifdef _LIBCPP_PREFERRED_OVERLOAD && !defined(__CUDACC__)
  31. _LIBCPP_NODISCARD_EXT inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool isnan(float __x) _NOEXCEPT {
  32. return __builtin_isnan(__x);
  33. }
  34. diff --git a/include/complex b/include/complex
  35. index c8ffde9..7f44242 100644
  36. --- a/include/complex
  37. +++ b/include/complex
  38. @@ -1526,7 +1526,7 @@ inline namespace literals
  39. return { 0.0, static_cast<double>(__im) };
  40. }
  41. -
  42. +#if !defined(__CUDACC__)
  43. _LIBCPP_HIDE_FROM_ABI constexpr complex<float> operator""if(long double __im)
  44. {
  45. return { 0.0f, static_cast<float>(__im) };
  46. @@ -1536,6 +1536,7 @@ inline namespace literals
  47. {
  48. return { 0.0f, static_cast<float>(__im) };
  49. }
  50. +#endif
  51. } // namespace complex_literals
  52. } // namespace literals
  53. #endif
  54. diff --git a/include/tuple b/include/tuple
  55. index e7fc1e2..eb1785c 100644
  56. --- a/include/tuple
  57. +++ b/include/tuple
  58. @@ -308,7 +308,7 @@ class __tuple_leaf
  59. template <class _Tp>
  60. static _LIBCPP_HIDE_FROM_ABI constexpr bool __can_bind_reference() {
  61. -#if __has_keyword(__reference_binds_to_temporary)
  62. +#if __has_keyword(__reference_binds_to_temporary) && !defined(__CUDACC__)
  63. return !__reference_binds_to_temporary(_Hp, _Tp);
  64. #else
  65. return true;