From 2d1d6cf33607f3116703f92aaaeb0aba0c14abcb Mon Sep 17 00:00:00 2001 From: Matt Borland Date: Fri, 26 Jul 2024 16:30:23 -0400 Subject: [PATCH] Adjust test tools definition of throw in GPU environment --- include_private/boost/math/tools/test.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include_private/boost/math/tools/test.hpp b/include_private/boost/math/tools/test.hpp index 8f4db18c1..7547ef5be 100644 --- a/include_private/boost/math/tools/test.hpp +++ b/include_private/boost/math/tools/test.hpp @@ -306,7 +306,9 @@ void test_check_throw(Val v, boost::math::rounding_error const*) // exception-free testing support, ideally we'd only define this in our tests, // but to keep things simple we really need it somewhere that's always included: // -#ifdef BOOST_MATH_NO_EXCEPTIONS +#if defined(BOOST_MATH_NO_EXCEPTIONS) && defined(BOOST_MATH_HAS_GPU_SUPPORT) +# define BOOST_MATH_CHECK_THROW(x, y) +#elif defined(BOOST_MATH_NO_EXCEPTIONS) # define BOOST_MATH_CHECK_THROW(x, ExceptionType) boost::math::tools::test_check_throw(x, static_cast(nullptr)); #else # define BOOST_MATH_CHECK_THROW(x, y) BOOST_CHECK_THROW(x, y)