diff --git a/libcxx/include/__math/traits.h b/libcxx/include/__math/traits.h index 2be3f76a8f3465d..92a758e52718310 100644 --- a/libcxx/include/__math/traits.h +++ b/libcxx/include/__math/traits.h @@ -93,7 +93,7 @@ _LIBCPP_NODISCARD inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI boo // // When libc++ is layered on top of Bionic's libc, `math.h` exposes a function prototype for `isinf(double)` // with return type `int`. This function prototype in Bionic's libc is not guarded by any preprocessor macros. -#if !(defined(_LIBCPP_CXX03_LANG) && defined(__GLIBC__)) && !defined(__BIONIC__) +#if (!(defined(_LIBCPP_CXX03_LANG) && defined(__GLIBC__)) && !defined(__BIONIC__)) || _LIBCPP_STD_VER >= 23 _LIBCPP_NODISCARD inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool isinf(double __x) _NOEXCEPT { return __builtin_isinf(__x); } @@ -129,7 +129,7 @@ _LIBCPP_NODISCARD inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI boo // // When libc++ is layered on top of Bionic's libc, `math.h` exposes a function prototype for `isnan(double)` // with return type `int`. This function prototype in Bionic's libc is not guarded by any preprocessor macros. -#if !(defined(_LIBCPP_CXX03_LANG) && defined(__GLIBC__)) && !defined(__BIONIC__) +#if (!(defined(_LIBCPP_CXX03_LANG) && defined(__GLIBC__)) && !defined(__BIONIC__)) || _LIBCPP_STD_VER >= 23 _LIBCPP_NODISCARD inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool isnan(double __x) _NOEXCEPT { return __builtin_isnan(__x); }