libqi-api  2.8.7.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Macros
assert.hpp File Reference
#include <boost/predef/compiler.h>
#include <cassert>

Go to the source code of this file.

Macros

#define _QI_ASSERT_HPP_
 
#define QI_ASSERT(expr__)   assert( expr__ )
 
#define QI_ASSERT_TRUE(expr__)   QI_ASSERT( expr__ )
 
#define QI_ASSERT_FALSE(expr__)   QI_ASSERT( !(expr__) )
 
#define QI_ASSERT_UNREACHABLE()   QI_ASSERT( false )
 
#define QI_ASSERT_NULL(expr__)   QI_ASSERT_TRUE( expr__ == nullptr )
 
#define QI_ASSERT_NOT_NULL(expr__)   QI_ASSERT_TRUE( expr__ != nullptr )
 
#define QI_TRUE_OR_RETURN_FALSE(expr__)   if (!(expr__)) return false
 

Macro Definition Documentation

#define _QI_ASSERT_HPP_

Definition at line 8 of file assert.hpp.

#define QI_ASSERT (   expr__)    assert( expr__ )

Definition at line 27 of file assert.hpp.

#define QI_ASSERT_FALSE (   expr__)    QI_ASSERT( !(expr__) )

Definition at line 32 of file assert.hpp.

#define QI_ASSERT_NOT_NULL (   expr__)    QI_ASSERT_TRUE( expr__ != nullptr )

Definition at line 35 of file assert.hpp.

#define QI_ASSERT_NULL (   expr__)    QI_ASSERT_TRUE( expr__ == nullptr )

Definition at line 34 of file assert.hpp.

#define QI_ASSERT_TRUE (   expr__)    QI_ASSERT( expr__ )

Definition at line 31 of file assert.hpp.

#define QI_ASSERT_UNREACHABLE ( )    QI_ASSERT( false )

Definition at line 33 of file assert.hpp.

#define QI_TRUE_OR_RETURN_FALSE (   expr__)    if (!(expr__)) return false

If the expression is false, return false. Designed to be used in a boolean function where all conditions must be true for the function to be true. See isRegular() in conceptpredicates.hpp for a use example.

Definition at line 41 of file assert.hpp.