diff --git a/include/boost/math/ccmath/isinf.hpp b/include/boost/math/ccmath/isinf.hpp index f1e00e34f5..f762cc45aa 100644 --- a/include/boost/math/ccmath/isinf.hpp +++ b/include/boost/math/ccmath/isinf.hpp @@ -22,7 +22,14 @@ constexpr bool isinf BOOST_MATH_PREVENT_MACRO_SUBSTITUTION(T x) noexcept { if constexpr (std::numeric_limits::is_signed) { +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wtautological-constant-compare" +#endif return x == std::numeric_limits::infinity() || -x == std::numeric_limits::infinity(); +#ifdef __clang__ +#pragma clang diagnostic pop +#endif } else { @@ -32,7 +39,7 @@ constexpr bool isinf BOOST_MATH_PREVENT_MACRO_SUBSTITUTION(T x) noexcept else { using boost::math::isinf; - + if constexpr (!std::is_integral_v) { return (isinf)(x);