hpp-util 6.0.0
Debugging tools for the HPP project.
Loading...
Searching...
No Matches
assertion.hh File Reference
Include dependency graph for assertion.hh:

Go to the source code of this file.

Namespaces

namespace  hpp
 

Macros

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

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)
Class to ease exception creation.
Definition exception-factory.hh:73

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.