[libcxx-commits] [libcxx] [libc++][math] Fix acceptance of convertible types in `std::isnan()` and `std::isinf()` (PR #98952)
Robin Caloudis via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Aug 6 07:02:21 PDT 2024
================
@@ -705,15 +705,16 @@ void test_isinf()
static_assert((std::is_same<decltype(std::isinf((float)0)), bool>::value), "");
typedef decltype(std::isinf((double)0)) DoubleRetType;
-#if !defined(__linux__) || defined(__clang__)
- static_assert((std::is_same<DoubleRetType, bool>::value), "");
-#else
+#if defined(__GLIBC__) && defined(_LIBCPP_CXX03_LANG) && !defined(_LIBCPP_PREFERRED_OVERLOAD)
----------------
robincaloudis wrote:
Totally agree!
https://github.com/llvm/llvm-project/pull/98952
More information about the libcxx-commits
mailing list