Go to the documentation of this file.
7 #ifndef _QI_ASSERT_HPP_
8 #define _QI_ASSERT_HPP_
11 #include <boost/predef/compiler.h>
20 # define QI_ASSERT(expr__)
24 # define QI_ASSERT( expr__ ) { if( !( expr__ ) ){ __debugbreak(); ::std::abort(); } }
27 # define QI_ASSERT( expr__ ) assert( expr__ )
31 # define QI_ASSERT_TRUE( expr__ ) QI_ASSERT( expr__ )
32 # define QI_ASSERT_FALSE( expr__ ) QI_ASSERT( !(expr__) )
33 # define QI_ASSERT_UNREACHABLE() QI_ASSERT( false )
34 # define QI_ASSERT_NULL( expr__ ) QI_ASSERT_TRUE( expr__ == nullptr )
35 # define QI_ASSERT_NOT_NULL( expr__ ) QI_ASSERT_TRUE( expr__ != nullptr )
41 # define QI_TRUE_OR_RETURN_FALSE( expr__ ) if (!(expr__)) return false
43 #endif // _QI_ASSERT_HPP_