aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp/libcxxcuda11/patches/38-complex.patch
blob: d962ef7638087a8b4ea70a317d3cdb942183ade4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/include/complex b/include/complex
index 7f44242..066141b 100644
--- a/include/complex
+++ b/include/complex
@@ -1375,7 +1375,8 @@ acos(const complex<_Tp>& __x)
     }
     if (std::__constexpr_isinf(__x.imag()))
         return complex<_Tp>(__pi/_Tp(2), -__x.imag());
-    if (__x.real() == 0 && (__x.imag() == 0 || std::isnan(__x.imag())))
+    // Somehow isnan can be a macro, so we use __constexpr_isnan
+    if (__x.real() == 0 && (__x.imag() == 0 || std::__constexpr_isnan(__x.imag())))
         return complex<_Tp>(__pi/_Tp(2), -__x.imag());
     complex<_Tp> __z = std::log(__x + std::sqrt(std::__sqr(__x) - _Tp(1)));
     if (std::signbit(__x.imag()))