Blaze 3.9
Assert.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_UTIL_ASSERT_H_
36#define _BLAZE_UTIL_ASSERT_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
43#include <cassert>
45
46
47namespace blaze {
48
49//=================================================================================================
50//
51// RUN TIME ASSERTION
52//
53//=================================================================================================
54
55//*************************************************************************************************
83inline bool ASSERT_MESSAGE( const char* /*msg*/ )
84{
85 return false;
86}
87//*************************************************************************************************
88
89
90//*************************************************************************************************
98#if BLAZE_INTERNAL_ASSERTION
99# define BLAZE_INTERNAL_ASSERT(expr,msg) assert( ( expr ) || blaze::ASSERT_MESSAGE( msg ) )
100#else
101# define BLAZE_INTERNAL_ASSERT(expr,msg)
102#endif
103//*************************************************************************************************
104
105
106//*************************************************************************************************
114#if BLAZE_USER_ASSERTION
115# define BLAZE_USER_ASSERT(expr,msg) assert( ( expr ) || blaze::ASSERT_MESSAGE( msg ) )
116#else
117# define BLAZE_USER_ASSERT(expr,msg)
118#endif
119//*************************************************************************************************
120
121} // namespace blaze
122
123#endif
bool ASSERT_MESSAGE(const char *)
Assertion helper function.
Definition: Assert.h:83
Configuration of the run time assertion macros.