From c80aa8169ece778382aaaceaa1c885ebfa95db30 Mon Sep 17 00:00:00 2001 From: Matheus Castanho Date: Wed, 7 Jul 2021 16:10:34 -0300 Subject: [PATCH] Fix build on platforms with "double-double" long double type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since commit 01f3b7d7721fd most tests started to fail on platforms that use a "double-double" for long double, like powerpc64le: ../../../boost/math/tools/precision.hpp:148:137: error: expected primary-expression before ‘long’ 148 | inline constexpr long double epsilon(const std::true_type& BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(long double)) noexcept(long double) ../../../boost/math/tools/precision.hpp:148:137: error: expected ‘)’ before ‘long’ 148 | inline constexpr long double epsilon(const std::true_type& BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(long double)) noexcept(long double) ../../../boost/math/tools/precision.hpp:148:137: error: expected initializer before ‘long’ 148 | inline constexpr long double epsilon(const std::true_type& BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(long double)) noexcept(long double) Fix this by replacing the noexcept expression with the contents of BOOST_MATH_NOEXCEPT, which was the intention of commit 01f3b7d7721fd. --- include/boost/math/tools/precision.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/math/tools/precision.hpp b/include/boost/math/tools/precision.hpp index f0a4c80a0c..1bc35d9ae1 100644 --- a/include/boost/math/tools/precision.hpp +++ b/include/boost/math/tools/precision.hpp @@ -145,7 +145,7 @@ inline constexpr T epsilon(const std::true_type& BOOST_MATH_APPEND_EXPLICIT_TEMP #if defined(__GNUC__) && ((LDBL_MANT_DIG == 106) || (__LDBL_MANT_DIG__ == 106)) template <> -inline constexpr long double epsilon(const std::true_type& BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(long double)) noexcept(long double) +inline constexpr long double epsilon(const std::true_type& BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(long double)) noexcept(std::is_floating_point::value) { // numeric_limits on Darwin (and elsewhere) tells lies here: // the issue is that long double on a few platforms is