amd.patch 695 B

1234567891011121314151617
  1. diff --git a/clang/lib/Headers/__clang_hip_cmath.h b/clang/lib/Headers/__clang_hip_cmath.h
  2. index 071c64c7af8d5b..e04fc7824b1771 100644
  3. --- a/clang/lib/Headers/__clang_hip_cmath.h
  4. +++ b/clang/lib/Headers/__clang_hip_cmath.h
  5. @@ -397,7 +397,12 @@ template <class _Tp> struct __numeric_type {
  6. // No support for long double, use double instead.
  7. static double __test(long double);
  8. - typedef decltype(__test(declval<_Tp>())) type;
  9. + template <typename _U>
  10. + static auto __test_impl(int) -> decltype(__test(declval<_U>()));
  11. +
  12. + template <typename _U> static void __test_impl(...);
  13. +
  14. + typedef decltype(__test_impl<_Tp>(0)) type;
  15. static const bool value = !is_same<type, void>::value;
  16. };