All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Assert.h
Go to the documentation of this file.
1 //=================================================================================================
20 //=================================================================================================
21 
22 #ifndef _BLAZE_UTIL_ASSERT_H_
23 #define _BLAZE_UTIL_ASSERT_H_
24 
25 
26 //*************************************************************************************************
27 // Includes
28 //*************************************************************************************************
29 
30 #include <cassert>
31 #include <blaze/system/Assertion.h>
32 
33 
34 namespace blaze {
35 
36 //=================================================================================================
37 //
38 // RUN TIME ASSERTION
39 //
40 //=================================================================================================
41 
42 //*************************************************************************************************
70 inline bool ASSERT_MESSAGE( const char* /*msg*/ )
71 {
72  return false;
73 }
74 //*************************************************************************************************
75 
76 
77 //*************************************************************************************************
85 #if BLAZE_INTERNAL_ASSERTION
86 # define BLAZE_INTERNAL_ASSERT(expr,msg) assert( ( expr ) || blaze::ASSERT_MESSAGE( msg ) )
87 #else
88 # define BLAZE_INTERNAL_ASSERT(expr,msg)
89 #endif
90 //*************************************************************************************************
91 
92 
93 //*************************************************************************************************
101 #if BLAZE_USER_ASSERTION
102 # define BLAZE_USER_ASSERT(expr,msg) assert( ( expr ) || blaze::ASSERT_MESSAGE( msg ) )
103 #else
104 # define BLAZE_USER_ASSERT(expr,msg)
105 #endif
106 //*************************************************************************************************
107 
108 } // namespace blaze
109 
110 #endif