From 93f011e1be508cb87dade679f45156ee0a47fa44 Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Mon, 20 Mar 2023 15:59:26 -0700 Subject: [PATCH] Add extra parentheses for concept tests --- include/boost/math/ccmath/abs.hpp | 2 +- include/boost/math/ccmath/isinf.hpp | 6 +++--- include/boost/math/ccmath/isnan.hpp | 6 +++--- include/boost/math/ccmath/ldexp.hpp | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/boost/math/ccmath/abs.hpp b/include/boost/math/ccmath/abs.hpp index fa798eba12..84e01fba01 100644 --- a/include/boost/math/ccmath/abs.hpp +++ b/include/boost/math/ccmath/abs.hpp @@ -31,7 +31,7 @@ namespace detail { template constexpr T abs_impl(T x) noexcept { - if (boost::math::ccmath::isnan(x)) + if ((boost::math::ccmath::isnan)(x)) { return std::numeric_limits::quiet_NaN(); } diff --git a/include/boost/math/ccmath/isinf.hpp b/include/boost/math/ccmath/isinf.hpp index 706b9605c2..338f7a7b0b 100644 --- a/include/boost/math/ccmath/isinf.hpp +++ b/include/boost/math/ccmath/isinf.hpp @@ -22,7 +22,7 @@ namespace boost::math::ccmath { template -constexpr bool isinf(T x) noexcept +constexpr bool (isinf)(T x) noexcept { if(BOOST_MATH_IS_CONSTANT_EVALUATED(x)) { @@ -41,11 +41,11 @@ constexpr bool isinf(T x) noexcept if constexpr (!std::is_integral_v) { - return isinf(x); + return (isinf)(x); } else { - return isinf(static_cast(x)); + return (isinf)(static_cast(x)); } } } diff --git a/include/boost/math/ccmath/isnan.hpp b/include/boost/math/ccmath/isnan.hpp index ca915a4642..2394abfb7c 100644 --- a/include/boost/math/ccmath/isnan.hpp +++ b/include/boost/math/ccmath/isnan.hpp @@ -21,7 +21,7 @@ namespace boost::math::ccmath { template -inline constexpr bool isnan(T x) +inline constexpr bool (isnan)(T x) { if(BOOST_MATH_IS_CONSTANT_EVALUATED(x)) { @@ -33,11 +33,11 @@ inline constexpr bool isnan(T x) if constexpr (!std::is_integral_v) { - return isnan(x); + return (isnan)(x); } else { - return isnan(static_cast(x)); + return (isnan)(static_cast(x)); } } } diff --git a/include/boost/math/ccmath/ldexp.hpp b/include/boost/math/ccmath/ldexp.hpp index 92277706fb..31730b265f 100644 --- a/include/boost/math/ccmath/ldexp.hpp +++ b/include/boost/math/ccmath/ldexp.hpp @@ -45,8 +45,8 @@ inline constexpr Real ldexp(Real arg, int exp) noexcept if(BOOST_MATH_IS_CONSTANT_EVALUATED(arg)) { return boost::math::ccmath::abs(arg) == Real(0) ? arg : - boost::math::ccmath::isinf(arg) ? arg : - boost::math::ccmath::isnan(arg) ? arg : + (boost::math::ccmath::isinf)(arg) ? arg : + (boost::math::ccmath::isnan)(arg) ? arg : boost::math::ccmath::detail::ldexp_impl(arg, exp); } else