From 787b03ea9ca35089cecb80c5f2ca37e10046fbaf Mon Sep 17 00:00:00 2001 From: Glen Fernandes Date: Sat, 18 Jan 2025 17:14:03 -0500 Subject: [PATCH] Use BOOST_ASSERT but disable assertions on older GCC --- include/boost/core/detail/assert.hpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/include/boost/core/detail/assert.hpp b/include/boost/core/detail/assert.hpp index d2d16a7..d677e2e 100644 --- a/include/boost/core/detail/assert.hpp +++ b/include/boost/core/detail/assert.hpp @@ -7,15 +7,12 @@ Distributed under the Boost Software License, Version 1.0. */ #undef BOOST_CORE_DETAIL_ASSERT -#include - -#if !defined(NDEBUG) && \ - !defined(__clang__) && \ +#if !defined(__clang__) && \ !defined(__INTEL_COMPILER) && \ defined(__GNUC__) && \ (__GNUC__ < 5) -#define BOOST_CORE_DETAIL_ASSERT(expr) \ - ((expr) ? void(0) : __assert_fail(#expr, __FILE__, __LINE__, 0)) +#define BOOST_CORE_DETAIL_ASSERT(expr) void(0) #else -#define BOOST_CORE_DETAIL_ASSERT(expr) assert(expr) +#include +#define BOOST_CORE_DETAIL_ASSERT(expr) BOOST_ASSERT(expr) #endif