Skip to content

Commit

Permalink
Remove preprocessor directive for std::isnan()
Browse files Browse the repository at this point in the history
  • Loading branch information
robincaloudis committed Jul 15, 2024
1 parent 4edaeb5 commit f759c17
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions libcxx/include/__math/traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,20 +91,17 @@ _LIBCPP_NODISCARD _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool isnan
return false;
}

#ifdef _LIBCPP_PREFERRED_OVERLOAD
_LIBCPP_NODISCARD inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool isnan(float __x) _NOEXCEPT {
return __builtin_isnan(__x);
}

_LIBCPP_NODISCARD inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI _LIBCPP_PREFERRED_OVERLOAD bool
isnan(double __x) _NOEXCEPT {
_LIBCPP_NODISCARD inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool isnan(double __x) _NOEXCEPT {
return __builtin_isnan(__x);
}

_LIBCPP_NODISCARD inline _LIBCPP_CONSTEXPR_SINCE_CXX23 _LIBCPP_HIDE_FROM_ABI bool isnan(long double __x) _NOEXCEPT {
return __builtin_isnan(__x);
}
#endif

// isnormal

Expand Down

0 comments on commit f759c17

Please sign in to comment.