hpp-util  4.9.0
Debugging tools for the HPP project.
assertion.hh File Reference
#include <boost/scope_exit.hpp>
#include <hpp/util/config.hh>
#include <hpp/util/exception.hh>
Include dependency graph for assertion.hh:

Go to the source code of this file.

Namespaces

 hpp
 

Macros

#define HPP_ENABLE_ASSERTIONS
 
#define HPP_ASSERT(CONDITION)
 Define HPP_ASSERT. More...
 
#define HPP_PRECONDITION(CONDITION)   HPP_ASSERT (CONDITION)
 Define macro for precondition checking. More...
 

Functions

 hpp::HPP_MAKE_EXCEPTION (HPP_UTIL_DLLAPI, AssertionError)
 

Macro Definition Documentation

◆ HPP_ASSERT

#define HPP_ASSERT (   CONDITION)
Value:
do { \
bool _x = static_cast<bool>(CONDITION); \
if (!_x) \
HPP_THROW_EXCEPTION \
(::hpp::AssertionError, \
#CONDITION " evaluates to false"); \
} while (0)

Define HPP_ASSERT.

Throw an ::hpp::AssertionError if macro argument evaluates to false.

◆ HPP_ENABLE_ASSERTIONS

#define HPP_ENABLE_ASSERTIONS

◆ HPP_PRECONDITION

#define HPP_PRECONDITION (   CONDITION)    HPP_ASSERT (CONDITION)

Define macro for precondition checking.