From 178d2875d71e32e0339e7679e73f9a955f2dccd3 Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Tue, 21 Jan 2020 09:14:40 +0300 Subject: [PATCH] Remove ugly things from the test (refs #86) --- example/assert_handler.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/example/assert_handler.cpp b/example/assert_handler.cpp index 7cb3ef0..63a0562 100644 --- a/example/assert_handler.cpp +++ b/example/assert_handler.cpp @@ -24,9 +24,6 @@ BOOST_NOINLINE void foo(int i) { bar(--i); } -namespace std { inline void ignore_abort(){ std::exit(0); } } -#define abort ignore_abort - //[getting_started_assert_handlers // BOOST_ENABLE_ASSERT_DEBUG_HANDLER is defined for the whole project @@ -38,7 +35,8 @@ namespace boost { inline void assertion_failed_msg(char const* expr, char const* msg, char const* function, char const* /*file*/, long /*line*/) { std::cerr << "Expression '" << expr << "' is false in function '" << function << "': " << (msg ? msg : "<...>") << ".\n" << "Backtrace:\n" << boost::stacktrace::stacktrace() << '\n'; - std::abort(); + /*<-*/ std::exit(0); /*->*/ + /*=std::abort();*/ } inline void assertion_failed(char const* expr, char const* function, char const* file, long line) {