mirror of
https://github.com/boostorg/assert.git
synced 2026-08-26 07:06:40 +02:00
Unconditionally declare boost::assertion_failed, boost::assertion_failed_msg
This commit is contained in:
+19
-12
@@ -25,6 +25,25 @@
|
||||
// boostinspect:naassert_macro
|
||||
//
|
||||
|
||||
//
|
||||
// Declarations of boost::assertion_failed, boost::assertion_failed_msg
|
||||
//
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
#if defined(BOOST_ASSERT_HANDLER_IS_NORETURN)
|
||||
BOOST_NORETURN
|
||||
#endif
|
||||
void assertion_failed( char const* expr, char const* function, char const* file, long line ); // user defined
|
||||
|
||||
#if defined(BOOST_ASSERT_HANDLER_IS_NORETURN)
|
||||
BOOST_NORETURN
|
||||
#endif
|
||||
void assertion_failed_msg( char const* expr, char const* msg, char const* function, char const* file, long line ); // user defined
|
||||
|
||||
} // namespace boost
|
||||
|
||||
//
|
||||
// BOOST_ASSERT, BOOST_ASSERT_MSG, BOOST_ASSERT_IS_VOID
|
||||
//
|
||||
@@ -44,18 +63,6 @@
|
||||
#include <boost/config.hpp> // for BOOST_LIKELY
|
||||
#include <boost/current_function.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
#if defined(BOOST_ASSERT_HANDLER_IS_NORETURN)
|
||||
BOOST_NORETURN
|
||||
#endif
|
||||
void assertion_failed(char const * expr, char const * function, char const * file, long line); // user defined
|
||||
#if defined(BOOST_ASSERT_HANDLER_IS_NORETURN)
|
||||
BOOST_NORETURN
|
||||
#endif
|
||||
void assertion_failed_msg(char const * expr, char const * msg, char const * function, char const * file, long line); // user defined
|
||||
} // namespace boost
|
||||
|
||||
#define BOOST_ASSERT(expr) (BOOST_LIKELY(!!(expr))? ((void)0): ::boost::assertion_failed(#expr, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__))
|
||||
#define BOOST_ASSERT_MSG(expr, msg) (BOOST_LIKELY(!!(expr))? ((void)0): ::boost::assertion_failed_msg(#expr, msg, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user