aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp/libcxx/patches/38-complex.patch
blob: a9ca4cd77cc7d7fb9808b5fd2f3119d112a185e6 (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 d553dad..95be60c 100644
--- a/include/complex
+++ b/include/complex
@@ -1341,7 +1341,8 @@ _LIBCPP_HIDE_FROM_ABI complex<_Tp> 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()))