mirror of
https://github.com/boostorg/core.git
synced 2025-05-09 23:03:54 +00:00
Use BOOST_ASSERT but disable assertions on older GCC
This commit is contained in:
parent
b9a2221b3b
commit
787b03ea9c
@ -7,15 +7,12 @@ Distributed under the Boost Software License, Version 1.0.
|
|||||||
*/
|
*/
|
||||||
#undef BOOST_CORE_DETAIL_ASSERT
|
#undef BOOST_CORE_DETAIL_ASSERT
|
||||||
|
|
||||||
#include <cassert>
|
#if !defined(__clang__) && \
|
||||||
|
|
||||||
#if !defined(NDEBUG) && \
|
|
||||||
!defined(__clang__) && \
|
|
||||||
!defined(__INTEL_COMPILER) && \
|
!defined(__INTEL_COMPILER) && \
|
||||||
defined(__GNUC__) && \
|
defined(__GNUC__) && \
|
||||||
(__GNUC__ < 5)
|
(__GNUC__ < 5)
|
||||||
#define BOOST_CORE_DETAIL_ASSERT(expr) \
|
#define BOOST_CORE_DETAIL_ASSERT(expr) void(0)
|
||||||
((expr) ? void(0) : __assert_fail(#expr, __FILE__, __LINE__, 0))
|
|
||||||
#else
|
#else
|
||||||
#define BOOST_CORE_DETAIL_ASSERT(expr) assert(expr)
|
#include <boost/assert.hpp>
|
||||||
|
#define BOOST_CORE_DETAIL_ASSERT(expr) BOOST_ASSERT(expr)
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user