Skip to content

Commit

Permalink
Allow overload for C++ >= 23 regardless of the platform
Browse files Browse the repository at this point in the history
  • Loading branch information
robincaloudis committed Jul 26, 2024
1 parent fe5daa6 commit b7ced0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libcxx/include/__math/traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit b7ced0b

Please sign in to comment.